summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-05-06 12:08:28 -0700
committerZac Medico <zmedico@gentoo.org>2010-05-06 12:08:28 -0700
commit7f54cb4aa5e5a4f7b003e6e07c2ce3b265ff4963 (patch)
treef1afca4cf073e515c16f29bb96447b53fa692110
parent6a0f33cc99943d26e4706e4776070232403a3949 (diff)
downloadportage-7f54cb4aa5e5a4f7b003e6e07c2ce3b265ff4963.tar.gz
portage-7f54cb4aa5e5a4f7b003e6e07c2ce3b265ff4963.tar.bz2
portage-7f54cb4aa5e5a4f7b003e6e07c2ce3b265ff4963.zip
Eliminate redundant os.sep in vardbapi._bump_mtime. Thanks to
grobian for reporting.
-rw-r--r--pym/portage/dbapi/vartree.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 1b97c382f..de583e7b5 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -822,6 +822,8 @@ class vardbapi(dbapi):
"""
self.root = _unicode_decode(root,
encoding=_encodings['content'], errors='strict')
+ if self.root[-1] != '/':
+ self.root += '/'
# Used by emerge to check whether any packages
# have been added or removed.
@@ -880,7 +882,7 @@ class vardbapi(dbapi):
This is called before an after any modifications, so that consumers
can use directory mtimes to validate caches. See bug #290428.
"""
- base = self.root + _os.sep + VDB_PATH
+ base = self.root + VDB_PATH
cat = catsplit(cpv)[0]
catdir = base + _os.sep + cat
t = time.time()