Bug 963023 - delta RPM's rebuild crash when creating starting the progress bar
Summary: delta RPM's rebuild crash when creating starting the progress bar
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 19
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 963645
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-15 02:03 UTC by Ian Firns
Modified: 2014-05-13 04:57 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-05-13 04:57:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ian Firns 2013-05-15 02:03:40 UTC
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):
yum 3.4.3-91.fc19

How reproducible:
Fairly easily provided an update incorporated delta rpms.

Actual results:
Traceback (most recent call last):
  File "/bin/livecd-creator", line 237, in <module>
    sys.exit(main())
  File "/bin/livecd-creator", line 218, in main
    creator.install()
  File "/usr/lib/python2.7/site-packages/imgcreate/creator.py", line 655, in install
    ayum.runInstall()
  File "/usr/lib/python2.7/site-packages/imgcreate/yuminst.py", line 212, in runInstall
    self.downloadPkgs(dlpkgs)
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 2378, in downloadPkgs
    presto.dequeue_all()
  File "/usr/lib/python2.7/site-packages/yum/drpm.py", line 278, in dequeue_all
    self.progress.start(text='<locally rebuilding deltarpms>', size=total)


Expected results:
Progress bar to show and delta RPM's to be rebuilt

Additional info:
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.

Regards,
firnsy

Comment 1 Zdeněk Pavlas 2013-05-15 07:05:10 UTC
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)

Comment 2 Ian Firns 2013-05-15 08:10:25 UTC
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.

Comment 3 Zdeněk Pavlas 2013-05-15 08:43:29 UTC
Ah, thanks.  Seems that livecd-creator uses it's own progress callback, with an incompatible signature than our BaseMeter.

class 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?

commit 85132da3060913378235c6ba8597aa4865d97885
Author: Zdenek Pavlas <zpavlas>
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
--- a/yum/drpm.py
+++ b/yum/drpm.py
@@ -275,7 +275,7 @@ class DeltaInfo:
                 if hasattr(progress, 'text_meter_total_size'):
                     progress.text_meter_total_size(0)
                 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
         while self._future_jobs:
             self.dequeue()

Comment 4 Ian Firns 2013-05-16 11:33:27 UTC
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.

Comment 5 Ian Firns 2013-05-30 00:51:35 UTC
I finally had some drpms come down the line and the above patch works as expected.

Comment 6 Chris Smart 2013-06-11 08:59:24 UTC
I have hit this bug and can also confirm that after applying the change to drpm.py the problem goes away. Thanks.

-c

Comment 7 Ian Firns 2014-05-13 04:57:23 UTC
Above patch works as expected.


Note You need to log in before you can comment on or make changes to this bug.