projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d32856
)
use write_atomic for the counter file
author
Zac Medico
<zmedico@gentoo.org>
Thu, 9 Feb 2006 04:25:56 +0000
(
04:25
-0000)
committer
Zac Medico
<zmedico@gentoo.org>
Thu, 9 Feb 2006 04:25:56 +0000
(
04:25
-0000)
svn path=/main/trunk/; revision=2686
pym/portage.py
patch
|
blob
|
history
diff --git
a/pym/portage.py
b/pym/portage.py
index 339cd2e429caf1cfdfa1b2860f1debff76aab23a..dd7775a5d302de91585cb4ce797fc3be46faa721 100644
(file)
--- a/
pym/portage.py
+++ b/
pym/portage.py
@@
-4142,12
+4142,7
@@
class dbapi:
#increment counter
counter += 1
# update new global counter file
- newcpath=cpath+".new"
- newcfile=open(newcpath,"w")
- newcfile.write(str(counter))
- newcfile.close()
- # now move global counter file into place
- os.rename(newcpath,cpath)
+ write_atomic(cpath, str(counter))
return counter
def invalidentry(self, mypath):