summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-03 21:48:56 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-03 21:48:56 +0000
commit17c994076bb65ae25f542f03514c578ae662ecd2 (patch)
tree9db133eb63f740801fc0993e0ad8d1fff4f7bb94 /pym
parent078e7254e676c53dc185181c3f1cc4d58d963fed (diff)
downloadportage-17c994076bb65ae25f542f03514c578ae662ecd2.tar.gz
portage-17c994076bb65ae25f542f03514c578ae662ecd2.tar.bz2
portage-17c994076bb65ae25f542f03514c578ae662ecd2.zip
Fix broken usage of lstrip in creating the PROFILE header field.
svn path=/main/trunk/; revision=6727
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/dbapi/bintree.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index e535f7f93..31086a5c5 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -740,9 +740,10 @@ class binarytree(object):
def _update_pkgindex_header(self, header):
portdir = normalize_path(os.path.realpath(self.settings["PORTDIR"]))
- profiles_base = os.path.join(portdir, "profiles")
+ profiles_base = os.path.join(portdir, "profiles") + os.path.sep
profile_path = normalize_path(os.path.realpath(self.settings.profile_path))
- profile_path = profile_path.lstrip(profiles_base)
+ if profile_path.startswith(profiles_base):
+ profile_path = profile_path[len(profiles_base):]
header["PROFILE"] = profile_path
header["VERSION"] = str(self._pkgindex_version)
base_uri = self.settings.get("PORTAGE_BINHOST_HEADER_URI")