Bug 232104

Summary: pungi fails in anaconda-runtime if the target CD is too small for packages
Product: [Fedora] Fedora Reporter: Pavel Roskin <plroskin>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-03-14 18:33:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
pungi configuration file none

Description Pavel Roskin 2007-03-13 21:18:31 UTC
Description of problem:
Current pungi-0.2.8-1.fc7 fails if trying to make one CD and there are too many
packages to fit the CD size

Version-Release number of selected component (if applicable):
11.2.0.35-1

How reproducible:
Always

Steps to Reproduce:
1. Set cdsize to 70 in pungi.conf
2. Set discs to 1 in pungi.conf
3. "Run pungi -c pungi.conf"
  
Actual results:
114 blocks
Traceback (most recent call last):
  File "/usr/bin/pungi", line 182, in <module>
    main()
  File "/usr/bin/pungi", line 118, in main
    mypungi.doSplittree()
  File "/usr/lib/python2.5/site-packages/pypungi/pungi.py", line 209, in doSplittree
    output = timber.main()
  File "/usr/lib/anaconda-runtime/splittree.py", line 387, in main
    self.splitRPMS()
  File "/usr/lib/anaconda-runtime/splittree.py", line 333, in splitRPMS
    self.reportSizes(disc, firstpkg=firstpackage, lastpkg=lastpackage)
UnboundLocalError: local variable 'firstpackage' referenced before assignment
4766 blocks

Expected results:
A comprehensible error message that the packages won't fit the disc 

Additional info:

Comment 1 Pavel Roskin 2007-03-13 21:18:31 UTC
Created attachment 149990 [details]
pungi configuration file

Comment 2 Pavel Roskin 2007-03-13 22:02:18 UTC
Actually, pungi was providing an invalid package_order_file, so it's not such a
big problem in Anaconda.  Sure, the Anaconda code could be made more robust, but
it's not like it's the main culprit in this case.

Comment 3 Chris Lumens 2007-03-14 18:33:21 UTC
I've fixed the error handling in anaconda so you'll get a real traceback and
message.  Please file a separate bug against pungi regarding the invalid
package_order_file, if you have not already done so.