[arch-projects] [dbscripts] [PATCH] db-move: commit all arches at once
Signed-off-by: Florian Pritz <bluewind@xinu.at> --- This patch is untested, but it should work. db-move | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/db-move b/db-move index 9166a99..afb7041 100755 --- a/db-move +++ b/db-move @@ -63,6 +63,7 @@ msg "Moving packages from [${repo_from}] to [${repo_to}]..." declare -A add_pkgs declare -A remove_pkgs for pkgbase in ${args[@]:2}; do + tag_list="" for pkgarch in ${ARCHES[@]} 'any'; do svnrepo_from="${WORKDIR}/svn/${pkgbase}/repos/${repo_from}-${pkgarch}" svnrepo_to="${WORKDIR}/svn/${pkgbase}/repos/${repo_to}-${pkgarch}" @@ -90,7 +91,7 @@ for pkgbase in ${args[@]:2}; do /usr/bin/svn mv -q -r HEAD "${svnrepo_from}/$file" "${svnrepo_to}/" done /usr/bin/svn rm --force -q "${svnrepo_from}" - /usr/bin/svn commit -q "${WORKDIR}/svn/${pkgbase}" -m "${0##*/}: moved ${pkgbase} from [${repo_from}] to [${repo_to}] (${pkgarch})" + tag_list="$tag_list, $pkgarch" for pkgname in ${pkgnames[@]}; do for tarch in ${tarches[@]}; do @@ -112,6 +113,8 @@ for pkgbase in ${args[@]:2}; do done fi done + tag_list="${tag_list#, }" + /usr/bin/svn commit -q "${WORKDIR}/svn/${pkgbase}" -m "${0##*/}: moved ${pkgbase} from [${repo_from}] to [${repo_to}] (${tag_list})" done for tarch in ${ARCHES[@]}; do -- 1.7.10
On Thu, Apr 12, 2012 at 11:41:04AM +0200, Florian Pritz wrote:
Signed-off-by: Florian Pritz <bluewind@xinu.at> --- This patch is untested, but it should work. db-move | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/db-move b/db-move index 9166a99..afb7041 100755 --- a/db-move +++ b/db-move @@ -63,6 +63,7 @@ msg "Moving packages from [${repo_from}] to [${repo_to}]..." declare -A add_pkgs declare -A remove_pkgs for pkgbase in ${args[@]:2}; do + tag_list="" for pkgarch in ${ARCHES[@]} 'any'; do svnrepo_from="${WORKDIR}/svn/${pkgbase}/repos/${repo_from}-${pkgarch}" svnrepo_to="${WORKDIR}/svn/${pkgbase}/repos/${repo_to}-${pkgarch}" @@ -90,7 +91,7 @@ for pkgbase in ${args[@]:2}; do /usr/bin/svn mv -q -r HEAD "${svnrepo_from}/$file" "${svnrepo_to}/" done /usr/bin/svn rm --force -q "${svnrepo_from}" - /usr/bin/svn commit -q "${WORKDIR}/svn/${pkgbase}" -m "${0##*/}: moved ${pkgbase} from [${repo_from}] to [${repo_to}] (${pkgarch})" + tag_list="$tag_list, $pkgarch"
Won't this end up committing something like "(, i686, x86_64)"? I would think it'd be better to do something like tag_list=() ... tag_list+=("$pkgarch") ... svn commit ... "$(IFS=,; echo "${taglist[*]}")" Which should generate something like "(i686,x86_64)". d
for pkgname in ${pkgnames[@]}; do for tarch in ${tarches[@]}; do @@ -112,6 +113,8 @@ for pkgbase in ${args[@]:2}; do done fi done + tag_list="${tag_list#, }" + /usr/bin/svn commit -q "${WORKDIR}/svn/${pkgbase}" -m "${0##*/}: moved ${pkgbase} from [${repo_from}] to [${repo_to}] (${tag_list})" done
for tarch in ${ARCHES[@]}; do -- 1.7.10
On 12.04.2012 11:54, Dave Reisner wrote:
On Thu, Apr 12, 2012 at 11:41:04AM +0200, Florian Pritz wrote:
Signed-off-by: Florian Pritz <bluewind@xinu.at> --- This patch is untested, but it should work. db-move | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/db-move b/db-move index 9166a99..afb7041 100755 --- a/db-move +++ b/db-move @@ -63,6 +63,7 @@ msg "Moving packages from [${repo_from}] to [${repo_to}]..." declare -A add_pkgs declare -A remove_pkgs for pkgbase in ${args[@]:2}; do + tag_list="" for pkgarch in ${ARCHES[@]} 'any'; do svnrepo_from="${WORKDIR}/svn/${pkgbase}/repos/${repo_from}-${pkgarch}" svnrepo_to="${WORKDIR}/svn/${pkgbase}/repos/${repo_to}-${pkgarch}" @@ -90,7 +91,7 @@ for pkgbase in ${args[@]:2}; do /usr/bin/svn mv -q -r HEAD "${svnrepo_from}/$file" "${svnrepo_to}/" done /usr/bin/svn rm --force -q "${svnrepo_from}" - /usr/bin/svn commit -q "${WORKDIR}/svn/${pkgbase}" -m "${0##*/}: moved ${pkgbase} from [${repo_from}] to [${repo_to}] (${pkgarch})" + tag_list="$tag_list, $pkgarch"
Won't this end up committing something like "(, i686, x86_64)"?
No, it will commit "(i686, x86_64)" (see `tag_list="${tag_list#, }"` before the commit down below). archrelease basically does it the same way.
for pkgname in ${pkgnames[@]}; do for tarch in ${tarches[@]}; do @@ -112,6 +113,8 @@ for pkgbase in ${args[@]:2}; do done fi done + tag_list="${tag_list#, }" + /usr/bin/svn commit -q "${WORKDIR}/svn/${pkgbase}" -m "${0##*/}: moved ${pkgbase} from [${repo_from}] to [${repo_to}] (${tag_list})" done
for tarch in ${ARCHES[@]}; do -- 1.7.10
-- Florian Pritz
On Thu, Apr 12, 2012 at 11:58:34AM +0200, Florian Pritz wrote:
On 12.04.2012 11:54, Dave Reisner wrote:
On Thu, Apr 12, 2012 at 11:41:04AM +0200, Florian Pritz wrote:
Signed-off-by: Florian Pritz <bluewind@xinu.at> --- This patch is untested, but it should work. db-move | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/db-move b/db-move index 9166a99..afb7041 100755 --- a/db-move +++ b/db-move @@ -63,6 +63,7 @@ msg "Moving packages from [${repo_from}] to [${repo_to}]..." declare -A add_pkgs declare -A remove_pkgs for pkgbase in ${args[@]:2}; do + tag_list="" for pkgarch in ${ARCHES[@]} 'any'; do svnrepo_from="${WORKDIR}/svn/${pkgbase}/repos/${repo_from}-${pkgarch}" svnrepo_to="${WORKDIR}/svn/${pkgbase}/repos/${repo_to}-${pkgarch}" @@ -90,7 +91,7 @@ for pkgbase in ${args[@]:2}; do /usr/bin/svn mv -q -r HEAD "${svnrepo_from}/$file" "${svnrepo_to}/" done /usr/bin/svn rm --force -q "${svnrepo_from}" - /usr/bin/svn commit -q "${WORKDIR}/svn/${pkgbase}" -m "${0##*/}: moved ${pkgbase} from [${repo_from}] to [${repo_to}] (${pkgarch})" + tag_list="$tag_list, $pkgarch"
Won't this end up committing something like "(, i686, x86_64)"?
No, it will commit "(i686, x86_64)" (see `tag_list="${tag_list#, }"` before the commit down below). archrelease basically does it the same way.
Ahh... Breezed over that bit.
for pkgname in ${pkgnames[@]}; do for tarch in ${tarches[@]}; do @@ -112,6 +113,8 @@ for pkgbase in ${args[@]:2}; do done fi done + tag_list="${tag_list#, }" + /usr/bin/svn commit -q "${WORKDIR}/svn/${pkgbase}" -m "${0##*/}: moved ${pkgbase} from [${repo_from}] to [${repo_to}] (${tag_list})" done
for tarch in ${ARCHES[@]}; do -- 1.7.10
-- Florian Pritz
Status? On 12.04.2012 11:41, Florian Pritz wrote:
Signed-off-by: Florian Pritz <bluewind@xinu.at> --- This patch is untested, but it should work. db-move | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/db-move b/db-move index 9166a99..afb7041 100755 --- a/db-move +++ b/db-move @@ -63,6 +63,7 @@ msg "Moving packages from [${repo_from}] to [${repo_to}]..." declare -A add_pkgs declare -A remove_pkgs for pkgbase in ${args[@]:2}; do + tag_list="" for pkgarch in ${ARCHES[@]} 'any'; do svnrepo_from="${WORKDIR}/svn/${pkgbase}/repos/${repo_from}-${pkgarch}" svnrepo_to="${WORKDIR}/svn/${pkgbase}/repos/${repo_to}-${pkgarch}" @@ -90,7 +91,7 @@ for pkgbase in ${args[@]:2}; do /usr/bin/svn mv -q -r HEAD "${svnrepo_from}/$file" "${svnrepo_to}/" done /usr/bin/svn rm --force -q "${svnrepo_from}" - /usr/bin/svn commit -q "${WORKDIR}/svn/${pkgbase}" -m "${0##*/}: moved ${pkgbase} from [${repo_from}] to [${repo_to}] (${pkgarch})" + tag_list="$tag_list, $pkgarch"
for pkgname in ${pkgnames[@]}; do for tarch in ${tarches[@]}; do @@ -112,6 +113,8 @@ for pkgbase in ${args[@]:2}; do done fi done + tag_list="${tag_list#, }" + /usr/bin/svn commit -q "${WORKDIR}/svn/${pkgbase}" -m "${0##*/}: moved ${pkgbase} from [${repo_from}] to [${repo_to}] (${tag_list})" done
for tarch in ${ARCHES[@]}; do
-- Florian Pritz
participants (2)
-
Dave Reisner
-
Florian Pritz