Ignore duplicate opening of rpm package file (#506361).
Yum calls open file callback twice for some packages which
makes our callback try second download and fail in some
cases. See the bz for details.
Resolves: rhbz#506361
Though this seems to be a yum bug, there is no will to fix it
there (it doesn't cause errors on installed system) so here
I am sending a patch on anaconda side.
---
yuminstall.py | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/yuminstall.py b/yuminstall.py
index 209a8d6..a4c0209 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -134,13 +134,17 @@ class simpleCallback:
nvra = "%s" %(po,)
self.instLog.write(self.modeText % (nvra,))
+ if nvra in self.files:
+ self.instLog.write("RPMCALLBACK_INST_OPEN_FILE already called for the file, skipping")
+ fn = self.files[nvra].name
+ f = open(fn, 'r')
+ self.files[nvra] = f
self.instLog.flush()
- self.files[nvra] = None
self.size = po.returnSimple('installedsize')
- while self.files[nvra] == None:
+ while nvra not in self.files:
try:
fn = repo.getPackage(po)
--
1.7.4
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list