From 88b2fee4f08f466d3b29f93e9282142429e13d7c Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 3 May 2010 13:05:46 -0700 Subject: Make vardbapi.counter_tick_core() create the counter file's parent directory if necessary, in order to avoid FileNotFound error. Thanks to Fabio Erculiani for reporting. --- pym/portage/dbapi/vartree.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pym') 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 -- cgit v1.2.3-1-g7c22