summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/emerge8
-rw-r--r--pym/portage.py3
2 files changed, 8 insertions, 3 deletions
diff --git a/bin/emerge b/bin/emerge
index f13a95c1e..4afe24432 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -1861,7 +1861,9 @@ class depgraph:
myfavdict[myfavkey]=myfavkey
print ">>> Recording",myfavkey,"in \"world\" favorites file..."
if not "--fetchonly" in myopts:
- portage.write_atomic(os.path.join(portage.root,portage.WORLD_FILE),"\n".join(myfavdict.values()))
+ portage.write_atomic(
+ os.path.join(portage.root, portage.WORLD_FILE.lstrip(os.sep)),
+ "\n".join(myfavdict.values()))
portage.mtimedb["resume"]["mergelist"]=mymergelist[:]
@@ -2032,7 +2034,9 @@ class depgraph:
myfavdict[myfavkey]=myfavkey
print ">>> Recording",myfavkey,"in \"world\" favorites file..."
emergelog(" === ("+str(mergecount)+" of "+str(len(mymergelist))+") Updating world file ("+x[pkgindex]+")")
- portage.write_atomic(os.path.join(myroot,portage.WORLD_FILE),"\n".join(myfavdict.values()))
+ portage.write_atomic(
+ os.path.join(myroot, portage.WORLD_FILE.lstrip(os.sep)),
+ "\n".join(myfavdict.values()))
if ("noclean" not in portage.features) and (x[0] != "binary"):
short_msg = "emerge: ("+str(mergecount)+" of "+str(len(mymergelist))+") "+x[pkgindex]+" Clean Post"
diff --git a/pym/portage.py b/pym/portage.py
index 8dd2866b0..c36e19193 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -5826,7 +5826,8 @@ class dblink:
os.chown(pdir, 0, portage_gid)
os.chmod(pdir, 02770)
- write_atomic(os.path.join(self.myroot,WORLD_FILE),"\n".join(newworldlist))
+ write_atomic(os.path.join(self.myroot, WORLD_FILE.lstrip(os.sep)),
+ "\n".join(newworldlist))
#do original postrm
if myebuildpath and os.path.exists(myebuildpath):