Bug 233384

Summary: splittree.py does not create os-discX dirs properly
Product: [Fedora] Fedora Reporter: Prarit Bhargava <prarit>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: dcantrell, jgranado
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-04-26 14:50:48 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
Fix for this issue
none
Fix for this issue
none
Fix for this issue
none
Another possible solution none

Description Prarit Bhargava 2007-03-21 23:15:19 UTC
Description of problem:

When using pungi:

Traceback (most recent call last):
  File "/usr/bin/pungi", line 183, in <module>
    main()
  File "/usr/bin/pungi", line 118, in main
    mypungi.doSplittree()
  File "/usr/lib/python2.5/site-packages/pypungi/pungi.py", line 226, in doSplit
tree
    output = timber.main()
  File "/usr/lib/anaconda-runtime/splittree.py", line 395, in main
    self.createSplitDirs()
  File "/usr/lib/anaconda-runtime/splittree.py", line 234, in createSplitDirs
    self.createDiscInfo(i)
  File "/usr/lib/anaconda-runtime/splittree.py", line 162, in createDiscInfo
    discinfo_file = open("%s-disc%d/.discinfo" % (self.dist_dir, discnumber), 'w
')
IOError: [Errno 2] No such file or directory: '/home/fedora-ia64/development/ia6
4/os-disc2/.discinfo'

Version-Release number of selected component (if applicable):
anaconda-runtime-11.2.0.37-1


How reproducible: 100%

Additional info: Patch attached.

Comment 1 Prarit Bhargava 2007-03-21 23:15:19 UTC
Created attachment 150631 [details]
Fix for this issue

Comment 2 Jesse Keating 2007-03-22 01:30:06 UTC
Those dirs are supposed to be created during the first disc loop.  Unless you've
somehow started splittree after your first disc existed, you shouldn't get this
error.  How did you get to this point

Comment 3 Prarit Bhargava 2007-03-22 13:38:55 UTC
Okay -- I stand corrected.  It seems to work if you do:

pungi -c /etc/pungi/pungi.conf --destdir=/home/fedora-ia64

but not if you do

pungi -c /etc/pungi/pungi.conf --destdir=/home/fedora-ia64 -GBP
pungi -c /etc/pungi/pungi.conf --destdir=/home/fedora-ia64 -SI

That's odd ...

P.

Comment 4 Prarit Bhargava 2007-03-23 19:14:47 UTC
I take back comment #3.  I've seen this happen with a clean destdir.

P.

Comment 5 Prarit Bhargava 2007-03-27 14:48:29 UTC
(In reply to comment #2)
> Those dirs are supposed to be created during the first disc loop.  Unless you've
> somehow started splittree after your first disc existed, you shouldn't get this
> error.  How did you get to this point

Jesse, this seems like a real problem. 

If I do a "-GBP" followed by a "-S", I get the error.  The os-disc[234..] dirs
are definately not be created.

Furthermore, if I do "-GBP" followed by:

 /usr/lib/anaconda-runtime/splittree.py --arch=ia64 --total-discs=5
--bin-discs=5 --src-discs=0 --release-string="Fedora Core development"
--pkgorderfile=/home/test/work/ia64/pkgorder-ia64
--distdir=/home/test/development/ia64/os --srcdir="/home/test" --productpath=Fedora

I see the same error.  Are we using this latest version of anaconda to build CD
isos in rawhide?

If so, then how does that work?

P.



Comment 6 Jesse Keating 2007-03-27 14:58:06 UTC
We don't make CDs in rawhide, only boot.iso.

This could very well be a splittree issue rather than a pungi one.  Will
investigate more after test3 goes out (which is DVD only so no splitting going on)

Comment 7 Prarit Bhargava 2007-03-27 18:46:51 UTC
Created attachment 151061 [details]
Fix for this issue

Jesse,

There's definately brokeness in anaconda's splittree.py.

Here's the situation:  In createSplitDirs (splittree.py), the code creates
directories for the 1st disc (os-disc1), but does not create dirs for the
additional discs.

P.

Comment 8 Prarit Bhargava 2007-03-28 13:40:23 UTC
Created attachment 151121 [details]
Fix for this issue

Sorry -- wrong patch uploaded.

P.

Comment 9 Joel Andres Granados 2007-04-25 12:03:51 UTC
Created attachment 153414 [details]
Another possible solution

Are all the dirs really needed.
In the previous versions of splittree.py the line existed without the "for",
and created a directory called RPMS:
"os.makedirs("%s-disc%d/%s/RPMS" % (self.dist_dir, i, self.product_path))"
AFAIK the RPMS directory needs to go but that does not mean that the
product_path directory needs to go as well (right ???)
Additionally I have looked at isos from previous FC versions and the CD that
are not the first CD only have the Fedora/RPMS directory, the rest are files. 
This means that the "for" line is not necessary.

Comment 10 Jeremy Katz 2007-04-26 14:50:48 UTC
Applied Joel's patch