diff options
-rwxr-xr-x | db-move | 24 | ||||
-rwxr-xr-x | db-update | 22 | ||||
-rwxr-xr-x | testing2x | 16 |
3 files changed, 31 insertions, 31 deletions
@@ -13,14 +13,14 @@ source_makepkg packagename="$1" repofrom="$2" repoto="$3" -arch="$4" +_arch="$4" -export CARCH="$arch" +export CARCH="$_arch" -ftppath_from="$FTP_BASE/$repofrom/os/$arch/" -ftppath_to="$FTP_BASE/$repoto/os/$arch/" -svnrepo_from="$repofrom-$arch" -svnrepo_to="$repoto-$arch" +ftppath_from="$FTP_BASE/$repofrom/os/$_arch/" +ftppath_to="$FTP_BASE/$repoto/os/$_arch/" +svnrepo_from="$repofrom-$_arch" +svnrepo_to="$repoto-$_arch" [ "$UID" = "" ] && UID=$(uid) @@ -29,8 +29,8 @@ WORKDIR="$TMPDIR/db-move.$svnrepo_from.$svnrepo_to.$UID" cleanup() { trap '' 0 2 # unlock - repo_unlock $repoto $arch - repo_unlock $repofrom $arch + repo_unlock $repoto $_arch + repo_unlock $repofrom $_arch rm -rf "$WORKDIR" [ "$1" ] && exit $1 } @@ -48,8 +48,8 @@ die() { trap ctrl_c 2 trap cleanup 0 -repo_lock $repoto $arch -repo_lock $repofrom $arch +repo_lock $repoto $_arch +repo_lock $repofrom $_arch /bin/mkdir -p "$WORKDIR" @@ -60,7 +60,7 @@ cd checkout /usr/bin/svn up -q $packagename if [ -d "$packagename/repos/$svnrepo_from" ]; then . "$packagename/repos/$svnrepo_from/$BUILDSCRIPT" - _pkgfile="$pkgname-$pkgver-$pkgrel-$CARCH$PKGEXT" + _pkgfile="$pkgname-$pkgver-$pkgrel-$_arch$PKGEXT" if [ ! -f "$ftppath_from/$_pkgfile" ]; then die "error: package file '$_pkgfile' not found in repo '$repofrom'" @@ -74,7 +74,7 @@ if [ -d "$packagename/repos/$svnrepo_from" ]; then echo " Moving svn entries" /usr/bin/svn mv -r HEAD "$packagename/repos/$svnrepo_from" "$packagename/repos/$svnrepo_to" - /usr/bin/svn commit -m "$(basename $0): moved $packagename from [$repofrom] to [$repoto] ($arch)" + /usr/bin/svn commit -m "$(basename $0): moved $packagename from [$repofrom] to [$repoto] ($_arch)" echo " Moving package file and updating DBs" cd "$WORKDIR" @@ -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" @@ -6,10 +6,10 @@ source_makepkg case "$0" in *64) - arch="x86_64" + _arch="x86_64" ;; *) - arch="i686" + _arch="i686" ;; esac WORKDIR="$TMPDIR/testing2x.$UID" @@ -36,20 +36,20 @@ cd checkout for pkg in $*; do moved=0 /usr/bin/svn up -q ${pkg} - if [ -f "${pkg}/repos/testing-${arch}/${BUILDSCRIPT}" ]; then + if [ -f "${pkg}/repos/testing-${_arch}/${BUILDSCRIPT}" ]; then for repo in core extra; do - if [ -f "${pkg}/repos/${repo}-${arch}/${BUILDSCRIPT}" ]; then - echo "===> Moving package '${pkg}': testing-${arch} -> ${repo}-${arch}" - $(dirname $0)/db-move "${pkg}" "testing" "${repo}" "${arch}" + if [ -f "${pkg}/repos/${repo}-${_arch}/${BUILDSCRIPT}" ]; then + echo "===> Moving package '${pkg}': testing-${_arch} -> ${repo}-${_arch}" + $(dirname $0)/db-move "${pkg}" "testing" "${repo}" "${_arch}" moved=1 break fi done if [ ${moved} -eq 0 ]; then - echo "===> Warning: ${pkg} is only in testing-${arch}, cannot determine where to move it" + echo "===> Warning: ${pkg} is only in testing-${_arch}, cannot determine where to move it" fi else - echo "===> Warning: ${pkg} is not in testing-${arch}" + echo "===> Warning: ${pkg} is not in testing-${_arch}" fi done |