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 1Pus2u-0001qV-FF for garchives@archives.gentoo.org; Wed, 02 Mar 2011 19:49:16 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D6C77E039A; Wed, 2 Mar 2011 19:49:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id A76B0E039A for ; Wed, 2 Mar 2011 19:49:08 +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 2ACD91B40C3 for ; Wed, 2 Mar 2011 19:49:08 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 14BDD8006A for ; Wed, 2 Mar 2011 19:49:07 +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: <96deeb3f4b83ffed0bef6b22afa7d0014f682f66.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: 96deeb3f4b83ffed0bef6b22afa7d0014f682f66 Date: Wed, 2 Mar 2011 19:49:07 +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: 8ff2145e27b776456ea8432469412594 commit: 96deeb3f4b83ffed0bef6b22afa7d0014f682f66 Author: Zac Medico gentoo org> AuthorDate: Wed Mar 2 19:46:57 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Wed Mar 2 19:46:57 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D96deeb3f Remove redundant CONTENTS parent dir generation. This code is redunant now, since similar code has been added to dblink.getcontents() in commit e0b4048274b2cfc1617f2eff379cbe8435e13ed4. --- pym/portage/dbapi/vartree.py | 29 +---------------------------- 1 files changed, 1 insertions(+), 28 deletions(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index cd8b1c1..376b382 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -824,23 +824,8 @@ class vardbapi(dbapi): # Empty path is a code used to represent empty contents. self._add_path("", pkg_hash) =20 - # 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: - x =3D x[eroot_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._add_path(x[eroot_len:], pkg_hash) =20 self._vardb._aux_cache["modified"].add(cpv) =20 @@ -1894,18 +1879,6 @@ class dblink(object): os =3D portage.os perf_md5 =3D portage.checksum.perform_md5 =20 - # Try to unmerge parent directories of everything - # listed in CONTENTS, since we can't necessarily - # assume that directories are listed in CONTENTS. - obj_split =3D obj.split(os.sep) - obj_split.pop() - while len(obj_split) > eroot_split_len: - parent =3D os.sep.join(obj_split) - if parent in mydirs: - break - mydirs.add(parent) - obj_split.pop() - file_data =3D pkgfiles[objkey] file_type =3D file_data[0] statobj =3D None