Red Hat Bugzilla – Bug 963023
delta RPM's rebuild crash when creating starting the progress bar
Last modified: 2014-05-13 00:57:23 EDT
Description of problem:
Building a custom ISO via livecd-creator whereby the downloaded package list contains some delta RPM's the rebuilding process crashes when trying to display the progress.
Version-Release number of selected component (if applicable):
Fairly easily provided an update incorporated delta rpms.
Traceback (most recent call last):
File "/bin/livecd-creator", line 237, in <module>
File "/bin/livecd-creator", line 218, in main
File "/usr/lib/python2.7/site-packages/imgcreate/creator.py", line 655, in install
File "/usr/lib/python2.7/site-packages/imgcreate/yuminst.py", line 212, in runInstall
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 2378, in downloadPkgs
File "/usr/lib/python2.7/site-packages/yum/drpm.py", line 278, in dequeue_all
self.progress.start(text='<locally rebuilding deltarpms>', size=total)
Progress bar to show and delta RPM's to be rebuilt
Issue arises from zpavals's commit 89f8953f. A simple one to fix, but I haven't delved too much into yum's internals to provide a suitable patch.
Thanks, thought I've already fixed this in commit fa2f72499... It's clear that here self.progress evaluates to True. My reproducer for BZ 952357 does not trigger this. What's the exception that is being raised, anyway? (you posted just the stack trace)
Oops, copy and pasting is clearly new to me. The exception is:
TypeError: start() takes at least 3 arguments (1 given)
I would have thought you supplying at least 2 arguments there, but clearly it's a python'ism that eludes me.
Ah, thanks. Seems that livecd-creator uses it's own progress callback, with an incompatible signature than our BaseMeter.
def start(self, filename=None, url=None, basename=None,
size=None, now=None, text=None):
I guess they've dropped the default values for filename and url, so they are positional arguments now. That's a bug, but working it around in Yum is simple. Please, as it's nontrivial to reproduce, could you verify that the following helps?
Author: Zdenek Pavlas <email@example.com>
Date: Wed May 15 10:41:08 2013 +0200
progress.start: supply the default filename & url. BZ 963023
diff --git a/yum/drpm.py b/yum/drpm.py
index b04779d..a3ddbb1 100644
@@ -275,7 +275,7 @@ class DeltaInfo:
if hasattr(progress, 'text_meter_total_size'):
self.progress = po.repo.callback
- self.progress.start(text='<locally rebuilding deltarpms>', size=total)
+ self.progress.start(None, None, text='<locally rebuilding deltarpms>', size=total)
self.done = 0
I'm not able to hit this at the moment due to know drpm's coming down the pipeline. The patch is in and I'll confirm as soon as possible.
I finally had some drpms come down the line and the above patch works as expected.
I have hit this bug and can also confirm that after applying the change to drpm.py the problem goes away. Thanks.
Above patch works as expected.