[yum-commits] Branch 'yum-3_2_X' - yum/rpmtrans.py
skvidal at osuosl.org
skvidal at osuosl.org
Mon Sep 14 21:03:21 UTC 2009
yum/rpmtrans.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 855d3f35fe6c4b303ccd1ac796771d056a225e29
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Mon Sep 14 16:22:07 2009 -0400
os.path.normpath() over the installroot dir
apparently opening a path NOT starting with '/' inside the chroot
that rpm makes for the transaction will open a file OUTSIDE of the chroot
no, I'm not sure I get it either.
diff --git a/yum/rpmtrans.py b/yum/rpmtrans.py
index 77b06a2..4542e03 100644
--- a/yum/rpmtrans.py
+++ b/yum/rpmtrans.py
@@ -339,7 +339,7 @@ class RPMTransaction:
# we hand back the right path to those 'outside' of the chroot() calls
# but we're using the right path inside.
if self.base.conf.installroot != '/':
- tsfn = tsfn.replace(self.base.conf.installroot,'')
+ tsfn = tsfn.replace(os.path.normpath(self.base.conf.installroot),'')
try:
if not os.path.exists(os.path.dirname(tsfn)):
os.makedirs(os.path.dirname(tsfn)) # make the dir,
More information about the Yum-commits
mailing list