summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-03-02 11:46:57 -0800
committerZac Medico <zmedico@gentoo.org>2011-03-14 09:03:57 -0700
commitcf7984f4bf2a050be26551c4e696a905711f3c8c (patch)
treeb302b88947b40c9fe607f9ae660e9123f655b617 /pym
parentefd2f0cc74a743fcc15f95ff5edae817c341cc49 (diff)
downloadportage-cf7984f4bf2a050be26551c4e696a905711f3c8c.tar.gz
portage-cf7984f4bf2a050be26551c4e696a905711f3c8c.tar.bz2
portage-cf7984f4bf2a050be26551c4e696a905711f3c8c.zip
Remove redundant CONTENTS parent dir generation.
This code is redunant now, since similar code has been added to dblink.getcontents() in commit e0b4048274b2cfc1617f2eff379cbe8435e13ed4.
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/dbapi/vartree.py29
1 files changed, 1 insertions, 28 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 52f0fbaa2..7395d5dd5 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -823,23 +823,8 @@ class vardbapi(dbapi):
# 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 = set()
for x in contents:
- x = x[eroot_len:]
- added_paths.add(x)
- self._add_path(x, pkg_hash)
- x_split = x.split(os.sep)
- x_split.pop()
- while x_split:
- parent = 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)
self._vardb._aux_cache["modified"].add(cpv)
@@ -1893,18 +1878,6 @@ class dblink(object):
os = portage.os
perf_md5 = portage.checksum.perform_md5
- # Try to unmerge parent directories of everything
- # listed in CONTENTS, since we can't necessarily
- # assume that directories are listed in CONTENTS.
- obj_split = obj.split(os.sep)
- obj_split.pop()
- while len(obj_split) > eroot_split_len:
- parent = os.sep.join(obj_split)
- if parent in mydirs:
- break
- mydirs.add(parent)
- obj_split.pop()
-
file_data = pkgfiles[objkey]
file_type = file_data[0]
statobj = None