From 75deac81c2ca88219a4bc31d4a9a3da4f8274863 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 10 Jun 2012 12:28:38 +0200 Subject: Make repositories for testing2x configurable --- config | 2 ++ config.local.gerolde | 2 ++ config.local.sigurd | 2 ++ test/lib/common.inc | 2 ++ testing2x | 16 ++++++++-------- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/config b/config index 4abddd5..44bfccc 100644 --- a/config +++ b/config @@ -3,6 +3,8 @@ SVNREPO='' PKGREPOS=() PKGPOOL='' SRCPOOL='' +TESTING_REPO='' +STABLE_REPOS=() CLEANUP_DESTDIR="/srv/package-cleanup" CLEANUP_DRYRUN=false diff --git a/config.local.gerolde b/config.local.gerolde index 4501a93..5e16b76 100644 --- a/config.local.gerolde +++ b/config.local.gerolde @@ -2,3 +2,5 @@ PKGREPOS=('core' 'extra' 'testing' 'staging' 'kde-unstable' 'gnome-unstable') PKGPOOL='pool/packages' SRCPOOL='sources/packages' SVNREPO='file:///srv/svn-packages' +TESTING_REPO='testing' +STABLE_REPOS=('core' 'extra') diff --git a/config.local.sigurd b/config.local.sigurd index 468ec64..4f95bd2 100644 --- a/config.local.sigurd +++ b/config.local.sigurd @@ -2,3 +2,5 @@ PKGREPOS=('community' 'community-testing' 'community-staging' 'multilib' 'multil PKGPOOL='pool/community' SRCPOOL='sources/community' SVNREPO='file:///srv/svn-packages' +TESTING_REPO='community-testing' +STABLE_REPOS=('community') diff --git a/test/lib/common.inc b/test/lib/common.inc index 827c207..35cdaee 100644 --- a/test/lib/common.inc +++ b/test/lib/common.inc @@ -106,6 +106,8 @@ setUp() { SVNREPO="file://${TMP}/svn-packages-repo" PKGREPOS=(${PKGREPOS[@]}) PKGPOOL="${PKGPOOL}" + TESTING_REPO='testing' + STABLE_REPOS=('core' 'extra') CLEANUP_DESTDIR="${TMP}/package-cleanup" SOURCE_CLEANUP_DESTDIR="${TMP}/source-cleanup" STAGING="${TMP}/staging" diff --git a/testing2x b/testing2x index f209e83..a05cb53 100755 --- a/testing2x +++ b/testing2x @@ -10,7 +10,7 @@ fi # Lock everything to reduce possibility of interfering task between the different repo-updates script_lock -for repo in 'core' 'extra' 'testing'; do +for repo in ${TESTING_REPO} ${STABLE_REPOS[@]}; do for pkgarch in ${ARCHES[@]}; do repo_lock ${repo} ${pkgarch} || exit 1 done @@ -24,16 +24,16 @@ for pkgbase in $*; do found_source=false for pkgarch in ${ARCHES[@]} 'any'; do - svnrepo_from="${WORKDIR}/${pkgbase}/testing-${pkgarch}" + svnrepo_from="${WORKDIR}/${pkgbase}/${TESTING_REPO}-${pkgarch}" if [ -r "${svnrepo_from}/PKGBUILD" ]; then found_source=true break fi done - ${found_source} || die "${pkgbase} not found in [testing]" + ${found_source} || die "${pkgbase} not found in [${TESTING_REPO}]" found_target=false for pkgarch in ${ARCHES[@]} 'any'; do - for repo in 'core' 'extra'; do + for repo in ${STABLE_REPOS[@]}; do svnrepo_to="${WORKDIR}/${pkgbase}/${repo}-${pkgarch}" if [ -r "${svnrepo_to}/PKGBUILD" ]; then found_target=true @@ -42,19 +42,19 @@ for pkgbase in $*; do fi done done - ${found_target} || die "${pkgbase} neither found in [core] nor [extra]" + ${found_target} || die "${pkgbase} not found in any of these repos: ${STABLE_REPOS[@]}" fi done for pkgarch in ${ARCHES[@]}; do - repo_unlock 'testing' ${pkgarch} + repo_unlock ${TESTING_REPO} ${pkgarch} done -for repo in 'core' 'extra'; do +for repo in ${STABLE_REPOS[@]}; do for pkgarch in ${ARCHES[@]}; do repo_unlock ${repo} ${pkgarch} done if [ -n "${pkgs[${repo}]}" ]; then - "$(dirname $0)/db-move" 'testing' "${repo}" ${pkgs[${repo}]} + "$(dirname $0)/db-move" ${TESTING_REPO} "${repo}" ${pkgs[${repo}]} fi done -- cgit v1.2.3-24-g4f1b