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 1PuWkW-0003i4-OE for garchives@archives.gentoo.org; Tue, 01 Mar 2011 21:04:53 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5AC581C014 for ; Tue, 1 Mar 2011 21:04:52 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 081701C0AC for ; Tue, 1 Mar 2011 20:55:26 +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 9373F1B41C2 for ; Tue, 1 Mar 2011 20:55:26 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 01DE88006D for ; Tue, 1 Mar 2011 20:55:26 +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: <908f430504c6142a0c0e452e9d9a9dcd808f87c6.zmedico@gentoo> 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: 908f430504c6142a0c0e452e9d9a9dcd808f87c6 Date: Tue, 1 Mar 2011 20:55:26 +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: 4ed78f3fee38de0b6f7111be477a4cd4 commit: 908f430504c6142a0c0e452e9d9a9dcd808f87c6 Author: Zac Medico gentoo org> AuthorDate: Tue Mar 1 18:06:01 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Mar 1 20:53:53 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D908f4305 owners_cache: implicitly add parent directories We can't necessarily assume that they are explicitly listed in CONTENTS. --- pym/portage/dbapi/vartree.py | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 9be12fb..b8881c8 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -822,8 +822,25 @@ class vardbapi(dbapi): if not contents: # Empty path is a code used to represent empty contents. self._add_path("", pkg_hash) + + # When adding paths, implicitly add parent directories, + # since we can't necessarily assume that they are + # explicitly listed in CONTENTS. + added_paths =3D set() for x in contents: - self._add_path(x[root_len:], pkg_hash) + x =3D x[root_len:] + added_paths.add(x) + self._add_path(x, pkg_hash) + x_split =3D x.split(os.sep) + x_split.pop() + while x_split: + parent =3D os.sep.join(x_split) + if parent in added_paths: + break + added_paths.add(parent) + self._add_path(parent, pkg_hash) + x_split.pop() + self._vardb._aux_cache["modified"].add(cpv) =20 def _add_path(self, path, pkg_hash):