Bug 109073 - splittree.py traceback because directory exists
splittree.py traceback because directory exists
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: anaconda (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Michael Fulbright
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-11-04 15:31 EST by Milan Kerslager
Modified: 2007-11-30 17:06 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-02-12 11:21:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Milan Kerslager 2003-11-04 15:31:08 EST
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 15:32:41 EST
I tryed anaconda-9.2-1.src.rpm from Rawhide but with no luck too.
Comment 2 Jeremy Katz 2003-11-06 14:27:05 EST
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 16:34:24 EST
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 08:59:47 EST
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 11:21:56 EST
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 11:32:57 EST
I cleaned out path to tree.

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