Git-Url:
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-tools.git;a=commitdiff;h=a0a32c9597a350eb849fcc88bce86f7b1087bc63
commit a0a32c9597a350eb849fcc88bce86f7b1087bc63
Author: Miklos Vajna <[EMAIL PROTECTED]>
Date: Thu May 15 03:34:27 2008 +0200
repoman fpmmerge: use repoman server rsync
- in fact i added an other new feature as well: it detects now if the
wip repo has more than one archs and it merges & cls each of them.
- also notice that this was the last code chunk that used sudo for
custom commands, so ideally once everybody upgraded we can clean up
sudoers: remove cp/rm/rsync/genchangelog/updatesync and just allow
repoman server (though this won't happen before next stable is out)
diff --git a/repoman b/repoman
index d17eae6..dd78985 100755
--- a/repoman
+++ b/repoman
@@ -348,25 +348,28 @@ fpmmerge()
fi
check_servers
sudouser=$(eval "echo \$${reponame}_sudo")
- if [ -n "$sudouser" ]; then
- sudo_cmd="$sudo_env -u $sudouser"
- else
- sudo_cmd=""
- fi
srcurl=$(eval "echo \$$1_servers")
if [ -z "$srcurl" ]; then
die "so such repo!"
fi
- if ! ssh $host "cd $path/frugalware-$arch && $sudo_cmd rsync -avP `echo
$srcurl|sed 's/^.*@//'`/frugalware-$arch/*.fpm ./"; then
- die "rsync failed! :/"
- fi
+ # for each arch
+ mergearchs="`rsync -vP $srcurl/|grep ^d.*frugalware-|sed 's/.* //'`"
+ for i in $mergearchs
+ do
+ ssh $host "repoman server rsync '$sudouser' '$path' '$tmp'
'$srcurl' '$i'"
+ done
+
# now push
dg push -a
- # finally run repoman cl for each
- for i in `$0 -t $1 ls /frugalware-$arch/ 2>/dev/null|sed
's/-[^-]\+-[^-]\+-[^-]\+$//'`
+
+ # finally run repoman cl for each arch and pkg
+ for i in $archlist
do
- cd `git rev-parse --git-dir`/../source/*/$i 2>/dev/null ||
continue
- $0 -t $reponame cl $i
+ for j in `$0 -t $1 ls /frugalware-$i/ 2>/dev/null|sed
's/-[^-]\+-[^-]\+-[^-]\+$//'`
+ do
+ cd `git rev-parse --git-dir`/../source/*/$j 2>/dev/null
|| continue
+ arch=$i $0 -t $reponame cl $j
+ done
done
}
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git