summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-11-03 20:32:54 +0000
committerZac Medico <zmedico@gentoo.org>2006-11-03 20:32:54 +0000
commit0fe75ba28d0480839a2d41eb5cce0443c177141f (patch)
treecc4fe0f9875e22194d4fac08050e3edda8ebdf0c
parent1792be449cf90603b9fbd89272ff9e31afac94bd (diff)
downloadportage-0fe75ba28d0480839a2d41eb5cce0443c177141f.tar.gz
portage-0fe75ba28d0480839a2d41eb5cce0443c177141f.tar.bz2
portage-0fe75ba28d0480839a2d41eb5cce0443c177141f.zip
For bug #153951, fail with a simple "Permission denied" error if the merge phase doesn't have write access to $ROOT.
svn path=/main/trunk/; revision=4916
-rw-r--r--pym/portage.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pym/portage.py b/pym/portage.py
index ef84e3fc3..d6c5ec0be 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -3411,6 +3411,10 @@ def movefile(src,dest,newmtime=None,sstat=None,mysettings=None):
def merge(mycat, mypkg, pkgloc, infloc, myroot, mysettings, myebuild=None,
mytree=None, mydbapi=None, vartree=None, prev_mtimes=None):
+ if not os.access(myroot, os.W_OK):
+ writemsg("Permission denied: access('%s', W_OK)\n" % myroot,
+ noiselevel=-1)
+ return errno.EACCES
mylink = dblink(mycat, mypkg, myroot, mysettings, treetype=mytree,
vartree=vartree)
return mylink.merge(pkgloc, infloc, myroot, myebuild,