summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2007-06-23 15:50:35 +0000
committerMarius Mauch <genone@gentoo.org>2007-06-23 15:50:35 +0000
commitcdc79fea0976c56a93c5a1cfaa72b0ed88368b58 (patch)
tree6c5a44c56833e033c75a690d952e7d761a713e5f
parent552428f62a9d821f04b9c308b18ed75bd103647f (diff)
downloadportage-cdc79fea0976c56a93c5a1cfaa72b0ed88368b58.tar.gz
portage-cdc79fea0976c56a93c5a1cfaa72b0ed88368b58.tar.bz2
portage-cdc79fea0976c56a93c5a1cfaa72b0ed88368b58.zip
Allow sync for unpriviledges users if they have write access to $PORTDIR
svn path=/main/trunk/; revision=6973
-rw-r--r--pym/emerge/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py
index 17ff8d58d..fc23f5dc6 100644
--- a/pym/emerge/__init__.py
+++ b/pym/emerge/__init__.py
@@ -5618,12 +5618,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: