From: Zac Medico Date: Mon, 3 May 2010 20:05:46 +0000 (-0700) Subject: Make vardbapi.counter_tick_core() create the counter file's parent directory X-Git-Tag: v2.2_rc68~617 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=88b2fee4f08f466d3b29f93e9282142429e13d7c;p=portage.git 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. --- 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