diff options
author | Aaron Griffin <aaronmgriffin@gmail.com> | 2008-09-13 17:49:59 -0500 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2008-09-13 17:49:59 -0500 |
commit | a0f73ceca409fa8995af16eee8440c1467c5f1bf (patch) | |
tree | c08c74f9b2f9d6a3d44e34672246565c8179ed34 /db-update | |
parent | 0730a707da94ff30b94c1f7829c8d247ddf0eeb2 (diff) |
Validate a package file's architecture
Apparently, people seem to be renaming files as a "hack" and
breaking things. Let's make sure they edited the PKGINFO too
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'db-update')
-rwxr-xr-x | db-update | 24 |
1 files changed, 15 insertions, 9 deletions
@@ -108,17 +108,23 @@ if [ -n "$ADDPKGS" ]; then for pkg in $ADDPKGS; do _pkgfile=$(basename $pkg) _pkgname="$(getpkgname $pkg)" - echo " Checking SVN for $_pkgname" - /usr/bin/svn up -q $_pkgname - if [ -d "$_pkgname/repos/$svnrepo" ]; then - . "$_pkgname/repos/$svnrepo/$BUILDSCRIPT" - if [ "$_pkgfile" = "$pkgname-$pkgver-$pkgrel-$CARCH$PKGEXT" ]; then - to_add="$to_add $pkg" + + echo " Validating package arch ($arch) $_pkgname" + if ! check_pkg_arch "$pkg" "$arch"; then + echo " ERROR: $_pkgfile was built for the wrong architecture" + else + echo " Checking SVN for $_pkgname" + /usr/bin/svn up -q $_pkgname + if [ -d "$_pkgname/repos/$svnrepo" ]; then + . "$_pkgname/repos/$svnrepo/$BUILDSCRIPT" + if [ "$_pkgfile" = "$pkgname-$pkgver-$pkgrel-$CARCH$PKGEXT" ]; then + to_add="$to_add $pkg" + else + echo " WARNING: $_pkgfile does not match $BUILDSCRIPT in $svnrepo" + fi else - echo " WARNING: $_pkgfile does not match $BUILDSCRIPT in $svnrepo" + echo " WARNING: Package $_pkgname not found in $svnrepo" fi - else - echo " WARNING: Package $_pkgname not found in $svnrepo" fi done |