summaryrefslogtreecommitdiffstats
path: root/pym/_emerge
diff options
context:
space:
mode:
authorDavid James <davidjames@google.com>2010-08-13 13:39:17 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-31 17:48:21 -0700
commitcb27c41a2d03209f07bc12f85c991537270dbb0e (patch)
tree94af354f35e02bee6fc69d86d9e50317e208d53f /pym/_emerge
parentb3bbf815e986dc9ac8c24116a6ed1ef912108722 (diff)
downloadportage-cb27c41a2d03209f07bc12f85c991537270dbb0e.tar.gz
portage-cb27c41a2d03209f07bc12f85c991537270dbb0e.tar.bz2
portage-cb27c41a2d03209f07bc12f85c991537270dbb0e.zip
Update portage to create directories atomically.
Portage should use the ensure_dirs function instead of os.makedirs to create directories, because this function ensures atomicity. It prevents failures when more than one process tries to create the same directory. This fixes a crash bug reported by msb: [...] File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 3258, in _merge self.vartree.dbapi._bump_mtime(self.mycpv) File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 152, in _bump_mtime os.makedirs(catdir) File "/usr/lib64/portage/pym/portage/__init__.py", line 210, in __call__ rval = self._func(*wrapped_args, **wrapped_kwargs) File "/usr/lib64/python2.6/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 17] File exists: '/home/msb/trunk/src/build/images/x86-generic/0.8.63.2010_08_03_1844-a1/rootfs//var/db/pkg/x11-proto' BUG=chromium-os:5366 TEST=build_packages && build_image Review URL: http://codereview.chromium.org/3113014
Diffstat (limited to 'pym/_emerge')
0 files changed, 0 insertions, 0 deletions