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 1Rd6HI-0002wj-QG for garchives@archives.gentoo.org; Tue, 20 Dec 2011 20:27:13 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4265421C061; Tue, 20 Dec 2011 20:27:04 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 0CEFB21C061 for ; Tue, 20 Dec 2011 20:27:03 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8BF581B401C for ; Tue, 20 Dec 2011 20:27:03 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 0709A80042 for ; Tue, 20 Dec 2011 20:27:03 +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: <3c36110f7c30fe866764dd1d20a65a273e0ecc6e.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master 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: 3c36110f7c30fe866764dd1d20a65a273e0ecc6e Date: Tue, 20 Dec 2011 20:27:03 +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: 3a6d02f6-f4a3-4361-9dc1-192d15b57242 X-Archives-Hash: 97c515b86ecf6ac7b330be0ecfa92c5c commit: 3c36110f7c30fe866764dd1d20a65a273e0ecc6e Author: Zac Medico gentoo org> AuthorDate: Tue Dec 20 20:26:48 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Dec 20 20:26:48 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D3c36110f Silently allow missing /var/cache/edb/counter. Files under /var/cache/ are allowed to disappear. --- pym/portage/dbapi/vartree.py | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index a9a147a..6e71848 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -772,8 +772,7 @@ class vardbapi(dbapi): =20 @param myroot: ignored, self._eroot is used instead """ - myroot =3D None - new_vdb =3D False + del myroot counter =3D -1 try: cfile =3D io.open( @@ -782,8 +781,9 @@ class vardbapi(dbapi): mode=3D'r', encoding=3D_encodings['repo.content'], errors=3D'replace') except EnvironmentError as e: - new_vdb =3D not bool(self.cpv_all()) - if not new_vdb: + # Silently allow ENOENT since files under + # /var/cache/ are allowed to disappear. + if e.errno !=3D errno.ENOENT: writemsg(_("!!! Unable to read COUNTER file: '%s'\n") % \ self._counter_path, noiselevel=3D-1) writemsg("!!! %s\n" % str(e), noiselevel=3D-1) @@ -820,10 +820,6 @@ class vardbapi(dbapi): if pkg_counter > max_counter: max_counter =3D pkg_counter =20 - if counter < 0 and not new_vdb: - writemsg(_("!!! Initializing COUNTER to " \ - "value of %d\n") % max_counter, noiselevel=3D-1) - return max_counter + 1 =20 def counter_tick_core(self, myroot=3DNone, incrementing=3D1, mycpv=3DNo= ne):