From 8c9b0d64cb8e84029a4a7f56ca12b24f09d1cce9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20B=C3=A4chler?= Date: Sat, 24 May 2008 12:27:07 +0200 Subject: Commit testing2x script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Bächler Signed-off-by: Aaron Griffin --- testing2x | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100755 testing2x (limited to 'testing2x') diff --git a/testing2x b/testing2x new file mode 100755 index 0000000..7096f1d --- /dev/null +++ b/testing2x @@ -0,0 +1,58 @@ +#!/bin/bash + +if [ -f "/etc/makepkg.conf" ]; then + . /etc/makepkg.conf +else + echo "/etc/makepkg.conf does not exist!" + exit 1 +fi + +case "$0" in + *64) + arch="x86_64" + ;; + *) + arch="i686" + ;; +esac +svnpath="file:///home/svn-packages" +WORKDIR="$(mktemp -d /tmp/testing2x.XXXXXX)" + +cleanup() { + rm -rf "${WORKDIR}" + [ -n "$1" ] && exit $1 +} + +ctrl_c() { + echo "Interrupted" >&2 + cleanup 0 +} + +trap ctrl_c 2 +trap cleanup 0 + +cd "${WORKDIR}" +/usr/bin/svn checkout -N ${svnpath} checkout +cd checkout + +for pkg in $*; do + moved=0 + /usr/bin/svn up -q ${pkg} + 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}" + moved=1 + break + fi + done + if [ ${moved} -eq 0 ]; then + echo "===> Warning: ${pkg} is only in testing-${arch}, cannot determine where to move it" + fi + else + echo "===> Warning: ${pkg} is not in testing-${arch}" + fi +done + +cleanup -- cgit v1.2.3-2-g168b From afc6b5b5977fe77e699af8f02f7c8c4c3df603de Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Sat, 30 Aug 2008 21:21:43 -0500 Subject: Create a "common functions" file for DB scripts Common functions, such as sourcing makepkg, and locking a repo Additionally, repo-locking has been unified to prevent multiple users from corrupting a repo (i.e. db-move run while db-remove in progress) Signed-off-by: Aaron Griffin --- testing2x | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'testing2x') diff --git a/testing2x b/testing2x index 7096f1d..c385fd8 100755 --- a/testing2x +++ b/testing2x @@ -1,11 +1,8 @@ #!/bin/bash -if [ -f "/etc/makepkg.conf" ]; then - . /etc/makepkg.conf -else - echo "/etc/makepkg.conf does not exist!" - exit 1 -fi +. "$(dirname $0)/db-functions" + +source_makepkg case "$0" in *64) @@ -29,7 +26,7 @@ ctrl_c() { } trap ctrl_c 2 -trap cleanup 0 +trap cleanup 0 1 cd "${WORKDIR}" /usr/bin/svn checkout -N ${svnpath} checkout -- cgit v1.2.3-2-g168b From 42bbb3dd2ef276c5204651fafb152a888c449c15 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Sat, 13 Sep 2008 20:30:27 -0500 Subject: Move temporary directories to /home/tmp This is to allow moves to /home/ftp/ to remain on the same filesystem, thus making the final moves atomic Signed-off-by: Aaron Griffin --- testing2x | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'testing2x') diff --git a/testing2x b/testing2x index c385fd8..687994e 100755 --- a/testing2x +++ b/testing2x @@ -13,7 +13,7 @@ case "$0" in ;; esac svnpath="file:///home/svn-packages" -WORKDIR="$(mktemp -d /tmp/testing2x.XXXXXX)" +WORKDIR="/home/tmp/testing2x.$UID" cleanup() { rm -rf "${WORKDIR}" -- cgit v1.2.3-2-g168b From 2063416ef4a160f56bb47f203257fe7903ba77e2 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Sun, 9 Nov 2008 00:27:43 -0600 Subject: Remove an erroneous '1' signal trap for cleanup() func Signed-off-by: Aaron Griffin --- testing2x | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'testing2x') diff --git a/testing2x b/testing2x index 687994e..0494b98 100755 --- a/testing2x +++ b/testing2x @@ -26,7 +26,7 @@ ctrl_c() { } trap ctrl_c 2 -trap cleanup 0 1 +trap cleanup 0 cd "${WORKDIR}" /usr/bin/svn checkout -N ${svnpath} checkout -- cgit v1.2.3-2-g168b From 35e5070403ddae96238bcce6356f4b9713c96675 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Tue, 11 Nov 2008 22:09:24 -0800 Subject: Move as much as we can out to a config file This should allow us to move FTP and SVN placement around Signed-off-by: Aaron Griffin --- testing2x | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'testing2x') diff --git a/testing2x b/testing2x index 0494b98..d87de11 100755 --- a/testing2x +++ b/testing2x @@ -12,7 +12,6 @@ case "$0" in arch="i686" ;; esac -svnpath="file:///home/svn-packages" WORKDIR="/home/tmp/testing2x.$UID" cleanup() { @@ -29,7 +28,7 @@ trap ctrl_c 2 trap cleanup 0 cd "${WORKDIR}" -/usr/bin/svn checkout -N ${svnpath} checkout +/usr/bin/svn checkout -N $SVN_PATH checkout cd checkout for pkg in $*; do -- cgit v1.2.3-2-g168b From 1809269f1df368aab3f7f1bb615c2cdc52860a1f Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Thu, 20 Nov 2008 21:48:00 -0800 Subject: Move everything to /srv to support new server conf Additionally, make TMPDIR configurable so we can move that Signed-off-by: Aaron Griffin --- testing2x | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'testing2x') diff --git a/testing2x b/testing2x index d87de11..812edd3 100755 --- a/testing2x +++ b/testing2x @@ -12,7 +12,7 @@ case "$0" in arch="i686" ;; esac -WORKDIR="/home/tmp/testing2x.$UID" +WORKDIR="$TMPDIR/testing2x.$UID" cleanup() { rm -rf "${WORKDIR}" -- cgit v1.2.3-2-g168b From 07ec0708d31794221bec7ee3e7f07755707fd36a Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Fri, 21 Nov 2008 01:05:09 -0500 Subject: Clear traps on cleanup This prevents us from trying to remove the lockfile twice, and calling cleanup multiple times Signed-off-by: Aaron Griffin --- testing2x | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) (limited to 'testing2x') diff --git a/testing2x b/testing2x index 812edd3..b576640 100755 --- a/testing2x +++ b/testing2x @@ -5,23 +5,24 @@ source_makepkg case "$0" in - *64) + *64) arch="x86_64" ;; - *) + *) arch="i686" ;; esac WORKDIR="$TMPDIR/testing2x.$UID" cleanup() { - rm -rf "${WORKDIR}" - [ -n "$1" ] && exit $1 + trap '' 0 2 + rm -rf "${WORKDIR}" + [ -n "$1" ] && exit $1 } ctrl_c() { - echo "Interrupted" >&2 - cleanup 0 + echo "Interrupted" >&2 + cleanup 0 } trap ctrl_c 2 @@ -32,23 +33,23 @@ cd "${WORKDIR}" cd checkout for pkg in $*; do - moved=0 - /usr/bin/svn up -q ${pkg} - 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}" - moved=1 - break - fi - done - if [ ${moved} -eq 0 ]; then - echo "===> Warning: ${pkg} is only in testing-${arch}, cannot determine where to move it" + moved=0 + /usr/bin/svn up -q ${pkg} + 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}" + moved=1 + break + fi + done + if [ ${moved} -eq 0 ]; then + echo "===> Warning: ${pkg} is only in testing-${arch}, cannot determine where to move it" + fi + else + echo "===> Warning: ${pkg} is not in testing-${arch}" fi - else - echo "===> Warning: ${pkg} is not in testing-${arch}" - fi done cleanup -- cgit v1.2.3-2-g168b From 9960434e090fc4a02adb2434c6f941c725642158 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Fri, 21 Nov 2008 15:20:41 -0800 Subject: Make working directory in testing2x Signed-off-by: Allan McRae Signed-off-by: Aaron Griffin --- testing2x | 1 + 1 file changed, 1 insertion(+) (limited to 'testing2x') diff --git a/testing2x b/testing2x index b576640..a5e3098 100755 --- a/testing2x +++ b/testing2x @@ -28,6 +28,7 @@ ctrl_c() { trap ctrl_c 2 trap cleanup 0 +/bin/mkdir "${WORKDIR}" cd "${WORKDIR}" /usr/bin/svn checkout -N $SVN_PATH checkout cd checkout -- cgit v1.2.3-2-g168b From 3606df775189459eef24fdec2bad5cab6ccc7ec6 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Fri, 21 Nov 2008 17:14:10 -0800 Subject: 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 --- testing2x | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'testing2x') diff --git a/testing2x b/testing2x index a5e3098..6a3a70e 100755 --- a/testing2x +++ b/testing2x @@ -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 -- cgit v1.2.3-2-g168b From 9b7b2a7e774f307b6b5ab398908e883364af7247 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Fri, 20 Feb 2009 10:23:07 -0800 Subject: Add per-repo SVN configs This could be useful if we move community to a separate SVN repo Signed-off-by: Aaron Griffin --- testing2x | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'testing2x') diff --git a/testing2x b/testing2x index 6a3a70e..0314738 100755 --- a/testing2x +++ b/testing2x @@ -13,6 +13,7 @@ case "$0" in ;; esac WORKDIR="$TMPDIR/testing2x.$UID" +svnpath="$(get_svnpath testing)" cleanup() { trap '' 0 2 @@ -30,7 +31,7 @@ trap cleanup 0 /bin/mkdir "${WORKDIR}" cd "${WORKDIR}" -/usr/bin/svn checkout -N $SVN_PATH checkout +/usr/bin/svn checkout -N $svnpath checkout cd checkout for pkg in $*; do -- cgit v1.2.3-2-g168b From 94c1ba6eed3fbdda8be0b7c67257d30dcabfd5c6 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 22 Jul 2009 20:02:37 +0200 Subject: remove support for different svn repos Signed-off-by: Aaron Griffin --- testing2x | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'testing2x') diff --git a/testing2x b/testing2x index 0314738..e116297 100755 --- a/testing2x +++ b/testing2x @@ -13,7 +13,6 @@ case "$0" in ;; esac WORKDIR="$TMPDIR/testing2x.$UID" -svnpath="$(get_svnpath testing)" cleanup() { trap '' 0 2 @@ -31,7 +30,7 @@ trap cleanup 0 /bin/mkdir "${WORKDIR}" cd "${WORKDIR}" -/usr/bin/svn checkout -N $svnpath checkout +/usr/bin/svn checkout -N $SVNREPO checkout cd checkout for pkg in $*; do -- cgit v1.2.3-2-g168b From 15de56aa8bb8104a01a983393f8a398348714a3a Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Mon, 17 Aug 2009 15:20:27 -0700 Subject: Remove dependence on makepkg.conf Removed the need for makepkg.conf * Killed off CARCH * Added PKGEXT to the config file * Remove source_makepkg function * Source config file where makepkg.conf was needed Signed-off-by: Aaron Griffin --- testing2x | 2 -- 1 file changed, 2 deletions(-) (limited to 'testing2x') diff --git a/testing2x b/testing2x index e116297..f3b256b 100755 --- a/testing2x +++ b/testing2x @@ -2,8 +2,6 @@ . "$(dirname $0)/db-functions" -source_makepkg - case "$0" in *64) _arch="x86_64" -- cgit v1.2.3-2-g168b From 2afa1063284a25ae2691b2727c45238d15025a9a Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 13 Sep 2009 18:16:55 -0500 Subject: Be more careful with config file inclusion We can't really do the basedir magic from db-functions as it is just being sourced and is not the currently executing script. Although a bit repetitive, it is a lot safer to just include the config file everywhere. Noticed this when trying to run the latest available scripts on sigurd. Signed-off-by: Dan McGee --- testing2x | 1 + 1 file changed, 1 insertion(+) (limited to 'testing2x') diff --git a/testing2x b/testing2x index f3b256b..f9ded9e 100755 --- a/testing2x +++ b/testing2x @@ -1,6 +1,7 @@ #!/bin/bash . "$(dirname $0)/db-functions" +. "$(dirname $0)/config" case "$0" in *64) -- cgit v1.2.3-2-g168b From d0b5dcb3ce6a1ec5222fc7a0420b3e1dc4c3a27e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 8 Aug 2010 11:53:07 +0200 Subject: Remove BUILDSCRIPT variable There is no need to have a variable for things like PKGBUILD that are very unlikely to ever change. --- testing2x | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'testing2x') diff --git a/testing2x b/testing2x index f9ded9e..4826853 100755 --- a/testing2x +++ b/testing2x @@ -35,9 +35,9 @@ 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}/PKGBUILD" ]; then for repo in core extra; do - if [ -f "${pkg}/repos/${repo}-${_arch}/${BUILDSCRIPT}" ]; then + if [ -f "${pkg}/repos/${repo}-${_arch}/PKGBUILD" ]; then echo "===> Moving package '${pkg}': testing-${_arch} -> ${repo}-${_arch}" $(dirname $0)/db-move "${pkg}" "testing" "${repo}" "${_arch}" moved=1 -- cgit v1.2.3-2-g168b From 388d629327d97e8d15a7a67cc87ae36edfe2f385 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 8 Aug 2010 13:08:47 +0200 Subject: use common workdir --- testing2x | 2 -- 1 file changed, 2 deletions(-) (limited to 'testing2x') diff --git a/testing2x b/testing2x index 4826853..e9fbeaa 100755 --- a/testing2x +++ b/testing2x @@ -11,7 +11,6 @@ case "$0" in _arch="i686" ;; esac -WORKDIR="$TMPDIR/testing2x.$UID" cleanup() { trap '' 0 2 @@ -27,7 +26,6 @@ ctrl_c() { trap ctrl_c 2 trap cleanup 0 -/bin/mkdir "${WORKDIR}" cd "${WORKDIR}" /usr/bin/svn checkout -N $SVNREPO checkout cd checkout -- cgit v1.2.3-2-g168b From 9eb1cd7b9403533c4b60ecfbbbf00a08c211059a Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 8 Aug 2010 15:03:27 +0200 Subject: Move common function to db-functions db-functions now sets an individual $WORKDIR and implements trap functinos that remove locks on exit or error. There are new functions to lock and unlock the running script. misc-scripts/ftpdir-cleanup was renamed to ftpdir-cleanup-repo as the cron-job had the same name. Script names have to be unique when using db-functions. --- testing2x | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'testing2x') diff --git a/testing2x b/testing2x index e9fbeaa..bf48be6 100755 --- a/testing2x +++ b/testing2x @@ -12,20 +12,6 @@ case "$0" in ;; esac -cleanup() { - trap '' 0 2 - rm -rf "${WORKDIR}" - [ -n "$1" ] && exit $1 -} - -ctrl_c() { - echo "Interrupted" >&2 - cleanup 0 -} - -trap ctrl_c 2 -trap cleanup 0 - cd "${WORKDIR}" /usr/bin/svn checkout -N $SVNREPO checkout cd checkout @@ -49,5 +35,3 @@ for pkg in $*; do echo "===> Warning: ${pkg} is not in testing-${_arch}" fi done - -cleanup -- cgit v1.2.3-2-g168b From a422060414670bb49d2422a38467b73ae01e7ecb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 13 Aug 2010 09:47:31 +0200 Subject: Use common functions to print messages, warnings and errors These functions are copied from makepkg --- testing2x | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'testing2x') diff --git a/testing2x b/testing2x index bf48be6..3626432 100755 --- a/testing2x +++ b/testing2x @@ -22,16 +22,16 @@ for pkg in $*; do if [ -f "${pkg}/repos/testing-${_arch}/PKGBUILD" ]; then for repo in core extra; do if [ -f "${pkg}/repos/${repo}-${_arch}/PKGBUILD" ]; then - echo "===> Moving package '${pkg}': testing-${_arch} -> ${repo}-${_arch}" + msg "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" + warning "${pkg} is only in testing-${_arch}, cannot determine where to move it" fi else - echo "===> Warning: ${pkg} is not in testing-${_arch}" + warning "${pkg} is not in testing-${_arch}" fi done -- cgit v1.2.3-2-g168b From 79db58732efbab54911ccbbb8cd876da29ea48c8 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 15 Aug 2010 18:21:33 +0200 Subject: Move packages of all arches within one transaction db-move does no longer need a specific architecture. It will move all architecures of a given package at once. testing2x has been rewritten to respect these changes and testing2x64 is no longer needed. --- testing2x | 67 ++++++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 29 deletions(-) (limited to 'testing2x') diff --git a/testing2x b/testing2x index 3626432..83b12fa 100755 --- a/testing2x +++ b/testing2x @@ -3,35 +3,44 @@ . "$(dirname $0)/db-functions" . "$(dirname $0)/config" -case "$0" in - *64) - _arch="x86_64" - ;; - *) - _arch="i686" - ;; -esac +if [ $# -lt 1 ]; then + msg "usage: $(basename $0) ..." + exit 1 +fi -cd "${WORKDIR}" -/usr/bin/svn checkout -N $SVNREPO checkout -cd checkout -for pkg in $*; do - moved=0 - /usr/bin/svn up -q ${pkg} - if [ -f "${pkg}/repos/testing-${_arch}/PKGBUILD" ]; then - for repo in core extra; do - if [ -f "${pkg}/repos/${repo}-${_arch}/PKGBUILD" ]; then - msg "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 - warning "${pkg} is only in testing-${_arch}, cannot determine where to move it" - fi - else - warning "${pkg} is not in testing-${_arch}" - fi +declare -A pkgs + +for pkgbase in $*; do + if [ ! -d "${WORKDIR}/${pkgbase}" ]; then + /usr/bin/svn export -q "${SVNREPO}/${pkgbase}/repos" "${WORKDIR}/${pkgbase}" >/dev/null + + found_source=false + for pkgarch in ${ARCHES[@]} 'any'; do + svnrepo_from="${WORKDIR}/${pkgbase}/testing-${pkgarch}" + if [ -r "${svnrepo_from}/PKGBUILD" ]; then + found_source=true + break + fi + done + ${found_source} || die "${pkgbase} not found in [testing]" + found_target=false + for pkgarch in ${ARCHES[@]} 'any'; do + for repo in 'core' 'extra'; do + svnrepo_to="${WORKDIR}/${pkgbase}/${repo}-${pkgarch}" + if [ -r "${svnrepo_to}/PKGBUILD" ]; then + found_target=true + pkgs[${repo}]+="${pkgbase} " + break 2 + fi + done + done + ${found_target} || die "${pkgbase} neither found in [core] nor [extra]" + fi +done + +for repo in 'core' 'extra'; do + if [ -n "${pkgs[${repo}]}" ]; then + "$(dirname $0)/db-move" 'testing' "${repo}" ${pkgs[${repo}]} + fi done -- cgit v1.2.3-2-g168b From b5fb2927cde513dc0fd82e4fd4dfe3836cf35728 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 15 Aug 2010 20:55:26 +0200 Subject: Lock repos before checking --- testing2x | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'testing2x') diff --git a/testing2x b/testing2x index 83b12fa..54cae11 100755 --- a/testing2x +++ b/testing2x @@ -8,6 +8,13 @@ if [ $# -lt 1 ]; then exit 1 fi +# Lock everything to reduce possibility of interfering task between the different repo-updates +script_lock +for repo in 'core' 'extra' 'testing'; do + for pkgarch in ${ARCHES[@]}; do + repo_lock ${repo} ${pkgarch} || exit 1 + done +done declare -A pkgs @@ -39,8 +46,16 @@ for pkgbase in $*; do fi done +for pkgarch in ${ARCHES[@]}; do + repo_unlock 'testing' ${pkgarch} +done for repo in 'core' 'extra'; do + for pkgarch in ${ARCHES[@]}; do + repo_unlock ${repo} ${pkgarch} + done if [ -n "${pkgs[${repo}]}" ]; then "$(dirname $0)/db-move" 'testing' "${repo}" ${pkgs[${repo}]} fi done + +script_unlock -- cgit v1.2.3-2-g168b