diff options
-rw-r--r-- | pym/portage.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/pym/portage.py b/pym/portage.py index aa0d3d5c2..650e831f5 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -4357,9 +4357,7 @@ class vardbapi(dbapi): if os.path.exists(old_eb_path+".ebuild"): os.rename(old_eb_path+".ebuild", new_eb_path+".ebuild") - catfile=open(newpath+"/CATEGORY", "w") - catfile.write(mynewcat+"\n") - catfile.close() + write_atomic(os.path.join(newpath, "CATEGORY"), mynewcat+"\n") dbdir = self.root+VDB_PATH for catdir in listdir(dbdir): @@ -5296,9 +5294,7 @@ class binarytree(packagetree): fixdbentries(origcp, newcp, mytmpdir) - catfile=open(mytmpdir+"/CATEGORY", "w") - catfile.write(mynewcat+"\n") - catfile.close() + write_atomic(os.path.join(mytmpdir, "CATEGORY"), mynewcat+"\n") try: os.rename(mytmpdir+"/"+string.split(mycpv,"/")[1]+".ebuild", mytmpdir+"/"+string.split(mynewcpv, "/")[1]+".ebuild") except SystemExit, e: |