summaryrefslogtreecommitdiffstats
path: root/testing2x
diff options
context:
space:
mode:
Diffstat (limited to 'testing2x')
-rwxr-xr-xtesting2x62
1 files changed, 30 insertions, 32 deletions
diff --git a/testing2x b/testing2x
index 369857f..48f2bb2 100755
--- a/testing2x
+++ b/testing2x
@@ -4,58 +4,56 @@
. "$(dirname $0)/db-functions"
if [ $# -lt 1 ]; then
- msg "usage: ${0##*/} <pkgname|pkgbase> ..."
+ msg "usage: ${0##*/} <pkgname> ..."
exit 1
fi
# Lock everything to reduce possibility of interfering task between the different repo-updates
script_lock
-for repo in ${TESTING_REPO} ${STABLE_REPOS[@]}; do
+for repo in ${TESTING_REPO} ${STABLE_REPOS[@]}; do
for pkgarch in ${ARCHES[@]}; do
repo_lock ${repo} ${pkgarch} || exit 1
done
done
-declare -A pkgs
-
-for pkgbase in $*; do
- if [ ! -d "${WORKDIR}/${pkgbase}" ]; then
- arch_svn export -q "${SVNREPO}/${pkgbase}/repos" "${WORKDIR}/${pkgbase}" >/dev/null
+for pkgname in "$@"; do
+ msg "Moving $pkgname"
+ for pkgarch in ${ARCHES[@]}; do
+ repo_from=""
+ repo_to=""
found_source=false
- for pkgarch in ${ARCHES[@]} 'any'; do
- svnrepo_from="${WORKDIR}/${pkgbase}/${TESTING_REPO}-${pkgarch}"
- if [ -r "${svnrepo_from}/PKGBUILD" ]; then
- found_source=true
+ found_target=false
+
+ path="${HISTORYREPO}/${TESTING_REPO}/${pkgarch}/${pkgname}"
+ if [ -e "${path}" ]; then
+ found_source=true
+ repo_from="${TESTING_REPO}"
+ fi
+ ${found_source} || continue
+
+ for repo in ${STABLE_REPOS[@]}; do
+ path="${HISTORYREPO}/${repo}/${pkgarch}/${pkgname}"
+ if [ -e "${path}" ]; then
+ found_target=true
+ repo_to="${repo}"
+
+ msg2 "$pkgarch $repo_from -> $repo_to"
+ arch_db_move "$repo_from" "$repo_to" "$pkgarch" "$pkgname"
break
fi
done
- ${found_source} || die "${pkgbase} not found in [${TESTING_REPO}]"
- found_target=false
- for pkgarch in ${ARCHES[@]} 'any'; do
- for repo in ${STABLE_REPOS[@]}; 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} not found in any of these repos: ${STABLE_REPOS[@]}"
- fi
+ ${found_target} || warning "${pkgname} not found in any of these repos: ${STABLE_REPOS[@]}. skipping"
+ done
+ ${found_source} || warning "${pkgname} not found in [${TESTING_REPO}]. skipping"
done
-for pkgarch in ${ARCHES[@]}; do
- repo_unlock ${TESTING_REPO} ${pkgarch}
-done
-for repo in ${STABLE_REPOS[@]}; do
+arch_history_commit "testing2x: $@"
+
+for repo in ${TESTING_REPO} ${STABLE_REPOS[@]}; do
for pkgarch in ${ARCHES[@]}; do
repo_unlock ${repo} ${pkgarch}
done
- if [ -n "${pkgs[${repo}]}" ]; then
- "$(dirname $0)/db-move" ${TESTING_REPO} "${repo}" ${pkgs[${repo}]}
- fi
done
script_unlock