summaryrefslogtreecommitdiffstats
path: root/bin/emerge
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-24 09:44:08 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-24 09:44:08 +0000
commita70338da115e109a8ec34b7a8070f08d43945b93 (patch)
tree72674860db927c2fc3b8155a84620d30967c2437 /bin/emerge
parentd57bf2d1fcd5b2b935266c90ac903ef0da2ff294 (diff)
downloadportage-a70338da115e109a8ec34b7a8070f08d43945b93.tar.gz
portage-a70338da115e109a8ec34b7a8070f08d43945b93.tar.bz2
portage-a70338da115e109a8ec34b7a8070f08d43945b93.zip
Allow sync for unpriviledges users if they have write access to $PORTDIR (bug #182786, trunk r6973)
svn path=/main/branches/2.1.2/; revision=6991
Diffstat (limited to 'bin/emerge')
-rwxr-xr-xbin/emerge6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/emerge b/bin/emerge
index 3d6e9e245..2502387d2 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -5472,12 +5472,12 @@ def emerge_main():
# check if root user is the current user for the actions where emerge needs this
if portage.secpass < 2:
# We've already allowed "--version" and "--help" above.
- if "--pretend" not in myopts and \
- myaction not in ("search","info"):
+ if "--pretend" not in myopts and myaction not in ("search","info"):
need_superuser = not \
("--fetchonly" in myopts or \
"--fetch-all-uri" in myopts or \
- myaction in ("metadata", "regen"))
+ myaction in ("metadata", "regen") or \
+ (myaction == "sync" and os.access(settings["PORTDIR"], os.W_OK))
if portage.secpass < 1 or \
need_superuser:
if need_superuser: