diff options
author | Aaron Griffin <aaronmgriffin@gmail.com> | 2008-11-22 02:14:10 +0100 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2008-11-22 02:14:10 +0100 |
commit | 3606df775189459eef24fdec2bad5cab6ccc7ec6 (patch) | |
tree | 26c55bd807eaa0cabc7930d8c1a965c6d0ac1f74 /db-update | |
parent | 9960434e090fc4a02adb2434c6f941c725642158 (diff) | |
download | dbscripts-3606df775189459eef24fdec2bad5cab6ccc7ec6.tar.gz dbscripts-3606df775189459eef24fdec2bad5cab6ccc7ec6.tar.xz |
Fix a variable overwrite when sourcing PKGBUILDs
The local variable 'arch' was being overwritten when we
source PKGBUILDs. Change it to _arch wherever we deal
with PKGBUILD files
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'db-update')
-rwxr-xr-x | db-update | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -10,12 +10,12 @@ fi source_makepkg reponame="$1" -arch="$2" +_arch="$2" -export CARCH="$arch" +export CARCH="$_arch" -ftppath="$FTP_BASE/$reponame/os/$arch/" -svnrepo="$reponame-$arch" +ftppath="$FTP_BASE/$reponame/os/$_arch/" +svnrepo="$reponame-$_arch" stagedir="$STAGING/$reponame" [ "$UID" = "" ] && UID=$(uid) @@ -48,7 +48,7 @@ getpkgname() { cleanup() { trap '' 0 2 # unlock - repo_unlock $reponame $arch + repo_unlock $reponame $_arch rm -rf "$WORKDIR" [ "$1" ] && exit $1 } @@ -66,7 +66,7 @@ die() { trap ctrl_c 2 trap cleanup 0 -repo_lock $reponame $arch +repo_lock $reponame $_arch /bin/mkdir -p "$WORKDIR/build" cd "$WORKDIR" @@ -78,7 +78,7 @@ else touch "build/$reponame.db.tar.$DB_COMPRESSION" fi -echo "Updating DB for $reponame $arch" +echo "Updating DB for $reponame $_arch" if [ -d "${stagedir}64" ]; then echo "--------------------------------------------------" @@ -102,7 +102,7 @@ fi to_add="" if [ -d "$stagedir" ]; then - ADDPKGS="$(/bin/ls $stagedir/*-${arch}$PKGEXT 2>/dev/null)" + ADDPKGS="$(/bin/ls $stagedir/*-${_arch}$PKGEXT 2>/dev/null)" fi if [ -n "$ADDPKGS" ]; then @@ -116,15 +116,15 @@ if [ -n "$ADDPKGS" ]; then _pkgfile=$(basename $pkg) _pkgname="$(getpkgname $pkg)" - echo " Validating package arch ($arch) $_pkgname" - if ! check_pkg_arch "$pkg" "$arch"; then + 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 + if [ "$_pkgfile" = "$pkgname-$pkgver-$pkgrel-$_arch$PKGEXT" ]; then to_add="$to_add $pkg" else echo " WARNING: $_pkgfile does not match $BUILDSCRIPT in $svnrepo" |