[arch-projects] [dbscripts] [PATCH] db-move: commit all arches at once
Dave Reisner
d at falconindy.com
Thu Apr 12 05:54:04 EDT 2012
On Thu, Apr 12, 2012 at 11:41:04AM +0200, Florian Pritz wrote:
> Signed-off-by: Florian Pritz <bluewind at 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
More information about the arch-projects
mailing list