diff options
author | simo <simo> | 2006-06-12 23:02:25 +0000 |
---|---|---|
committer | simo <simo> | 2006-06-12 23:02:25 +0000 |
commit | 885f309fbacc61f996e6e448fdd5d9604b7c3c6d (patch) | |
tree | a084869b6e0b8a8622c7eff26353d84f5602f8d1 /tupkg | |
parent | c94000db49c2201cbd17e4389aacb1ce9fbd3d03 (diff) | |
download | aurweb-885f309fbacc61f996e6e448fdd5d9604b7c3c6d.tar.xz |
Close #4757, bad permissions in repo db generation
Diffstat (limited to 'tupkg')
-rwxr-xr-x | tupkg/update/tupkgupdate | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/tupkg/update/tupkgupdate b/tupkg/update/tupkgupdate index 41f87d4..320ccbe 100755 --- a/tupkg/update/tupkgupdate +++ b/tupkg/update/tupkgupdate @@ -306,13 +306,21 @@ def runGensync(repo, pkgbuild): return execute(command) def runUpdatesyncUpd(repo, pkgbuild): + global havefakeroot targetDB = os.path.join(repo, "community.db.tar.gz") - command = "updatesync upd '" + targetDB + "' '" + pkgbuild + "' '" + repo +"'" + if havefakeroot: + command = "fakeroot updatesync upd '" + targetDB + "' '" + pkgbuild + "' '" + repo +"'" + else: + command = "updatesync upd '" + targetDB + "' '" + pkgbuild + "' '" + repo +"'" return execute(command) def runUpdatesyncDel(repo, pkgname): + global havefakeroot targetDB = os.path.join(repo, "community.db.tar.gz") - command = "updatesync del '" + targetDB + "' '" + pkgname +"'" + if havefakeroot: + command = "fakeroot updatesync del '" + targetDB + "' '" + pkgname +"'" + else: + command = "updatesync del '" + targetDB + "' '" + pkgname +"'" return execute(command) ############################################################ @@ -348,6 +356,13 @@ if (len(args_proper) < 3): print >>sys.stderr, "syntax: tupkgupdate [-n] [--delete] [--paranoid] <repo_dir> <pkgbuild_tree> <build_tree>" sys.exit(-1) +# Make sure we can use fakeroot, warn if not +havefakeroot = False +if os.access('/usr/bin/fakeroot', os.X_OK): + havefakeroot = True +else: + warning("Not using fakeroot for repo db generation") + repo_dir, pkgbuild_dir, build_dir = args_proper # Open the database so we find out now if we can't! |