diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-05-03 13:05:46 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-05-03 13:05:46 -0700 |
commit | 88b2fee4f08f466d3b29f93e9282142429e13d7c (patch) | |
tree | 66884f581e92e496924e54521a81e954c9ad16f7 | |
parent | f62ab4795fd71f9101840bd00d1b35ff39473fb1 (diff) | |
download | portage-88b2fee4f08f466d3b29f93e9282142429e13d7c.tar.gz portage-88b2fee4f08f466d3b29f93e9282142429e13d7c.tar.bz2 portage-88b2fee4f08f466d3b29f93e9282142429e13d7c.zip |
Make vardbapi.counter_tick_core() create the counter file's parent directory
if necessary, in order to avoid FileNotFound error. Thanks to Fabio Erculiani
<lxnay@g.o> for reporting.
-rw-r--r-- | pym/portage/dbapi/vartree.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index a306fb6d6..1b97c382f 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -1444,6 +1444,9 @@ class vardbapi(dbapi): if incrementing: #increment counter counter += 1 + # use same permissions as config._init_dirs() + ensure_dirs(os.path.dirname(self._counter_path), + gid=portage_gid, mode=0o2750, mask=0o2) # update new global counter file write_atomic(self._counter_path, str(counter)) return counter |