From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QPTyq-0003Zd-L0 for garchives@archives.gentoo.org; Thu, 26 May 2011 06:23:36 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5CE3D1C529; Thu, 26 May 2011 06:18:45 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 2A3341C527 for ; Thu, 26 May 2011 06:18:45 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EBD941B400D for ; Thu, 26 May 2011 06:18:44 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 5DB7D8050A for ; Thu, 26 May 2011 06:18:44 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: Subject: [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/dbapi/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/dbapi/vartree.py X-VCS-Directories: pym/portage/dbapi/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: ed640f020b59d46876e74aae9e347242744442b3 Date: Thu, 26 May 2011 06:18:44 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 582a280eb3912455027597db6f75074c commit: ed640f020b59d46876e74aae9e347242744442b3 Author: Zac Medico gentoo org> AuthorDate: Wed May 25 04:36:36 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu May 26 06:12:38 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Ded640f02 vardbapi: use config._init_dirs() when necessary --- pym/portage/dbapi/vartree.py | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 1db7d9e..aa57ab7 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -37,7 +37,7 @@ from portage.const import CACHE_PATH, CONFIG_MEMORY_FIL= E, \ from portage.const import _ENABLE_DYN_LINK_MAP, _ENABLE_PRESERVE_LIBS from portage.dbapi import dbapi from portage.exception import CommandNotFound, \ - InvalidData, InvalidPackageName, \ + InvalidData, InvalidLocation, InvalidPackageName, \ FileNotFound, PermissionDenied, UnsupportedAPIException from portage.localization import _ from portage.util.movefile import movefile @@ -787,11 +787,12 @@ class vardbapi(dbapi): if incrementing: #increment counter counter +=3D 1 - # use same permissions as config._init_dirs() - ensure_dirs(os.path.dirname(self._counter_path), - gid=3Dportage_gid, mode=3D0o2750, mask=3D0o2) # update new global counter file - write_atomic(self._counter_path, str(counter)) + try: + write_atomic(self._counter_path, str(counter)) + except InvalidLocation: + self.settings._init_dirs() + write_atomic(self._counter_path, str(counter)) self._cached_counter =3D counter finally: self.unlock()