Bug 109073 - splittree.py traceback because directory exists
Summary: splittree.py traceback because directory exists
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: anaconda
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Michael Fulbright
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-11-04 20:31 UTC by Milan Kerslager
Modified: 2007-11-30 22:06 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-02-12 16:21:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Milan Kerslager 2003-11-04 20:31:08 UTC
I modified RH Linux to have a kickstart server and trying to make ISO
files too. I succesfully used buildinstall but when trying to use
splittree.py I've got a traceback. It seems that script is trying to
make directory twice:

Traceback (most recent call last):
  File "/usr/lib/anaconda-runtime/splittree.py.orig", line 451, in ?
    logfile = timber.main()
  File "/usr/lib/anaconda-runtime/splittree.py.orig", line 378, in main
    self.createSplitDirs()
  File "/usr/lib/anaconda-runtime/splittree.py.orig", line 227, in
createSplitDirs
    os.makedirs("%s-disc%d/RedHat/RPMS" % (self.dist_dir, i))
  File "/usr/lib/python2.2/os.py", line 204, in makedirs
    mkdir(name, mode)
OSError: [Errno 17] File exists: '/mnt/extra/cdimage-disc1/RedHat/RPMS'

I commented out line 204 and it works (first disc was completed but
others has empty directories). But then I've got this eror message:

Traceback (most recent call last):
  File "/usr/lib/anaconda-runtime/splittree.py.orig", line 451, in ?
    logfile = timber.main()
  File "/usr/lib/anaconda-runtime/splittree.py.orig", line 379, in main
    self.splitRPMS()
  File "/usr/lib/anaconda-runtime/splittree.py.orig", line 325, in
splitRPMS
    self.reportSizes(disc, firstpkg=firstpackage, lastpkg=lastpackage)
UnboundLocalError: local variable 'firstpackage' referenced before
assignment

Comment 1 Milan Kerslager 2003-11-04 20:32:41 UTC
I tryed anaconda-9.2-1.src.rpm from Rawhide but with no luck too.

Comment 2 Jeremy Katz 2003-11-06 19:27:05 UTC
It looks like it's only creating once to me -- do the directories
exist before you're starting?

Comment 3 Milan Kerslager 2003-11-06 21:34:24 UTC
No. I tryed to remove directories with no luck.
I tryed to use splittree.py from Fedora Core 1 now and it works (ie. I
run it on FC1 system).

Comment 4 Chris Rouch 2003-12-19 13:59:47 UTC
The problem seems to be when splittree.py is run twice without the
directories being removed between runs. The script tries to create the
directories without checking if they already exist, resulting in an
exception.

I see this if I run
/usr/lib/anaconda-runtime/buildinstall --...
/usr/lib/anaconda-runtime/splittree.py --...

more than once. If there's a script that does the cleanup to be run
before buildinstall, then I can't find it.

Comment 5 Jeremy Katz 2004-02-12 16:21:56 UTC
Running twice without cleaning up in between isn't really supported. 
Plenty of other strange things could happen too.  rm -rf
/path/to/tree/foo-disc* before running splittree a second time.

Comment 6 Milan Kerslager 2004-02-12 16:32:57 UTC
I cleaned out path to tree.


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