[arch-projects] [dbscripts] [PATCH] db-move: commit all arches at once

Florian Pritz bluewind at xinu.at
Thu Apr 12 05:58:34 EDT 2012


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 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)"?

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.archlinux.org/pipermail/arch-projects/attachments/20120412/1289341c/attachment.asc>


More information about the arch-projects mailing list