[yum-commits] 2 commits - yum/drpm.py yum/misc.py
zpavlas at osuosl.org
zpavlas at osuosl.org
Mon Aug 26 13:53:11 UTC 2013
yum/drpm.py | 4 +++-
yum/misc.py | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
New commits:
commit fcfa89a772e2c21a268156b86efb96ebc5b71365
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date: Mon Aug 26 13:11:51 2013 +0200
unlink_f() should not fail on RDONLY fs
diff --git a/yum/misc.py b/yum/misc.py
index 3800811..7dcd215 100644
--- a/yum/misc.py
+++ b/yum/misc.py
@@ -951,7 +951,7 @@ def unlink_f(filename):
try:
os.unlink(filename)
except OSError, e:
- if e.errno not in (errno.ENOENT, errno.EPERM):
+ if e.errno not in (errno.ENOENT, errno.EPERM, errno.EROFS):
raise
def stat_f(filename, ignore_EACCES=False):
commit 803156464033a338de4516b1429e457f38dd20f7
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date: Mon Aug 26 13:22:54 2013 +0200
Don't unlink .drpm files from file:// repos. BZ 999591
diff --git a/yum/drpm.py b/yum/drpm.py
index b5bdee3..2e23241 100644
--- a/yum/drpm.py
+++ b/yum/drpm.py
@@ -253,7 +253,9 @@ class DeltaInfo:
elif not po.rpm.verifyLocalPkg():
self.adderror(po, _('Checksum of the delta-rebuilt RPM failed'))
else:
- os.unlink(po.localpath)
+ # done with drpm file, unlink when local
+ if po.localpath.startswith(po.repo.pkgdir):
+ os.unlink(po.localpath)
po.localpath = po.rpm.localpath # for --downloadonly
num += 1
More information about the Yum-commits
mailing list