diff options
author | Judd Vinet <judd@archlinux.org> | 2005-06-30 22:30:36 +0000 |
---|---|---|
committer | Judd Vinet <judd@archlinux.org> | 2005-06-30 22:30:36 +0000 |
commit | 7c99f3e12b92f5112f3f79bf55deebcab6c3fc11 (patch) | |
tree | bbaf7746f12f0461d0f275413d69d489a1b86802 | |
parent | 8c4c7c7ce6324bf1aa8ffb0b9c5e378d446166ef (diff) |
run gensync through fakeroot first, so all files are owned by root.root
-rw-r--r-- | db-inc | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -1,8 +1,13 @@ -# $Id: db-inc,v 1.2 2005/06/21 03:47:38 judd Exp $ +# $Id: db-inc,v 1.3 2005/06/30 22:30:36 judd Exp $ [ "$UID" = "" ] && UID=`uid` TMPDIR="/tmp/archpkg.$repoid.$UID" +if [ ! `type -p fakeroot` ]; then + echo "error: fakeroot is missing" + exit 1 +fi + cleanup() { rm -rf $TMPDIR # unlock @@ -37,7 +42,11 @@ if [ $? -gt 0 ]; then cleanup exit 1 fi -/usr/bin/gensync $TMPDIR/$cvsmod $TMPDIR/$reponame.db.tar.gz $ftppath + +echo "chown -R root.root $TMPDIR/$cvsmod;" \ + "/usr/bin/gensync $TMPDIR/$cvsmod $TMPDIR/$reponame.db.tar.gz $ftppath" \ + | fakeroot + [ -f $TMPDIR/$reponame.db.tar.gz ] && mv -f $TMPDIR/$reponame.db.tar.gz $ftppath echo "==> Scanning for New/Updated/Deleted packages..." >&2 @@ -56,4 +65,4 @@ fi cleanup -# vim: set ft=sh: +# vim: set ts=2 noet ft=sh: |