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
I tryed anaconda-9.2-1.src.rpm from Rawhide but with no luck too.
It looks like it's only creating once to me -- do the directories exist before you're starting?
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).
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.
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.
I cleaned out path to tree.