This service will be undergoing maintenance at 20:00 UTC, 2017-04-03. It is expected to last about 30 minutes
Bug 56428 - Bug in splitdistro
Bug in splitdistro
Status: CLOSED WORKSFORME
Product: Red Hat Linux
Classification: Retired
Component: anaconda (Show other bugs)
7.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-17 14:45 EST by LENHOF
Modified: 2007-04-18 12:38 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-01-21 13:20:47 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 LENHOF 2001-11-17 14:45:08 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2.1) Gecko/20010901

Description of problem:
After creating both binary CD, it fills the first source CD but not the
second one.

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


How reproducible:
Always

Steps to Reproduce:
./splitdistro --fileorder PKGORDER /new_version/ i386

	

Actual Results:  crash during the creation of the second CD

(It seems also to put preview on the first CD instead of the second one...
even if during the calculation it seems to be calculed for the second
one.... Just need after launching splitdistro to move preview from the
first CD to the second one)

Expected Results:  Create all of four CDs


Additional info:

[root@clf72av anaconda-runtime]# diff -u splitdistro
splitdistro.idm
--- splitdistro Mon Oct 22 22:34:46 2001
+++ splitdistro.idm Wed Nov 14 19:26:38 2001
@@ -143,7 +143,7 @@
 
 os.system("rm -rf %s %s %s %s" % ( disc1Dir, disc2Dir,
disc1SrcDir,
 disc2SrcDir))
-os.system("mkdir -p %s %s %s/SRPMS %s/RedHat/RPMS" % 
+os.system("mkdir -p %s %s/SRPMS %s/SRPMS %s/RedHat/RPMS" % 
 (disc1Dir, disc1SrcDir, disc2SrcDir, disc2Dir))
 
 print "Creating disc1..."
@@ -170,7 +170,7 @@
 disc2pkgs);
 
 print "Creating first source disc..."
-os.system("cp -al %s/. %s" % (srcDir, disc1SrcDir))
+os.system("cp -al %s/. %s/SRPMS" % (srcDir, disc1SrcDir))
 stamp(disc1SrcDir, "disc3", arch, startedAt)
 
 print "Creating second source disc..."
[root@clf72av anaconda-runtime]#
Comment 1 Jeremy Katz 2001-11-28 21:00:44 EST
It works just fine for me here with the following command sequence

[root@mordor scripts]# ls -p /home/tree
i386/ SRPMS/
[root@mordor scripts]# PYTHONPATH=../:../iconvmodule/ ./pkgorder
/home/tree/i386/ i386 > /tmp/newpkgorder
[root@mordor scripts]# ./splitdistro --fileorder /tmp/newpkgorder /home/tree/ i386
Splitting tree...
Creating disc1...
Creating disc2...
Creating first source disc...
Creating second source disc...

How are you trying to run it and how does your tree directory look?
Comment 2 Forrest 2001-11-30 14:15:14 EST
>[root@mordor scripts]# PYTHONPATH=../:../iconvmodule/ ./pkgorder
>/home/tree/i386/ i386 > /tmp/newpkgorder

Where were you when you executed this command?  I just tried it in 
the /usr/src/redhat/BUILD/anaconda-7.2/scripts directory, but I get an error:
ImportError: No module named isys

Also, is there an actual iconvmodule/ directory?
Comment 3 Jeremy Katz 2001-11-30 14:28:41 EST
This is HEAD anaconda, so I needed iconvmodule now... not necessary with 7.2. 
You'll actually need to run make in the anaconda-7.2 directory as well first so
that you get all of the python modules which get used.
Comment 4 Need Real Name 2001-12-12 08:31:23 EST
I applied the patch in my RH7.2 and this is working fine:
/usr/lib/anaconda-runtime/splitdistro --fileorder /tmp/newpkgorder
/home/ftp/pub/ i386
I then have this :
[root@sniff pub]# ll /home/ftp/pub
total 24
drwxr-xr-x    5 root     root         4096 Dec 12 14:02 i386
drwxr-xr-x    5 root     root         4096 Dec 12 14:20 i386-disc1
drwxr-xr-x    3 root     root         4096 Dec 12 14:20 i386-disc2
drwxr-xr-x    3 root     root         4096 Dec 12 14:20 i386-disc3
drwxr-xr-x    3 root     root         4096 Dec 12 14:20 i386-disc4
drwxr-xr-x    2 root     root         4096 Dec 11 16:40 SRPMS

But nothing appear in i386-disk2: there is no RPM package. The i386-disk1
directory is then too big.

And when i use the pkgorder, i have the following error (No module named comps):

[root@sniff pub]# /usr/lib/anaconda-runtime/pkgorder
/home/ftp/pub/i386/RedHat/base/comps i386 > /tmp/newpkgorder 
Traceback (innermost last):
  File "/usr/lib/anaconda-runtime/pkgorder", line 11, in ?
    import comps
ImportError: No module named comps

Any idea ?
Comment 5 Need Real Name 2001-12-12 09:38:45 EST
I applied the patch in my RH7.2 and this is working fine:
/usr/lib/anaconda-runtime/splitdistro --fileorder /tmp/newpkgorder
/home/ftp/pub/ i386
I then have this :
[root@sniff pub]# ll /home/ftp/pub
total 24
drwxr-xr-x    5 root     root         4096 Dec 12 14:02 i386
drwxr-xr-x    5 root     root         4096 Dec 12 14:20 i386-disc1
drwxr-xr-x    3 root     root         4096 Dec 12 14:20 i386-disc2
drwxr-xr-x    3 root     root         4096 Dec 12 14:20 i386-disc3
drwxr-xr-x    3 root     root         4096 Dec 12 14:20 i386-disc4
drwxr-xr-x    2 root     root         4096 Dec 11 16:40 SRPMS

But nothing appear in i386-disk2: there is no RPM package. The i386-disk1
directory is then too big.

And when i use the pkgorder, i have the following error (No module named comps):

[root@sniff pub]# /usr/lib/anaconda-runtime/pkgorder
/home/ftp/pub/i386/RedHat/base/comps i386 > /tmp/newpkgorder 
Traceback (innermost last):
  File "/usr/lib/anaconda-runtime/pkgorder", line 11, in ?
    import comps
ImportError: No module named comps

Any idea ?
Comment 6 LENHOF 2001-12-12 10:27:05 EST
To use pkgorder you need to to something like this :

PYTHONPATH=/usr/lib/anaconda ./pkgorder /home/ftp/pub/i386/RedHat/base/comps
i386 > /tmp/newpkgorder 

Jean-Yves LENHOF
Comment 7 Need Real Name 2001-12-12 10:47:26 EST
ok but i then have the following error:
Traceback (innermost last):
  File "./pkgorder", line 118, in ?
    n.unselect ()
  File "/usr/lib/anaconda/comps.py", line 292, in unselect
    "included by component %s", name, self.name)
  File "/usr/lib/anaconda/log.py", line 38, in __call__
    raise RuntimeError, "log file not open yet"
RuntimeError: log file not open yet


I don't think all is clear for me: i have all of my RPMS in one directory:
[root@sniff i386]# ll /home/ftp/pub/i386
total 12
drwxr-xr-x    3 root     root         4096 Nov 26 11:57 dosutils
drwxr-xr-x    8 root     root         4096 Dec 12 15:48 images
drwxr-xr-x    4 root     root         4096 Dec 12 15:49 RedHat

and i want to build 2 CDs
What are the different steps to do that ?
If i understood, i must do:
cd /usr/lib/anaconda-runtime
PYTHONPATH=/usr/lib/anaconda ./pkgorder /home/ftp/pub/i386/ i386 > /tmp/newpkgorder
./splitdistro --fileorder /tmp/newpkgorder /home/ftp/pub/ i386
but when must i use the genhdlist  script and what must be it's arguments ?
Thanks
Jirtme
Comment 8 Jeremy Katz 2002-01-21 20:29:25 EST
Further discussion of usage of all of these fun scripts should probably be moved
to anaconda-devel-list :)
Comment 9 Jeff Lovell 2002-04-02 14:39:28 EST
Can you please try this on a 7.2 system with all the curretly public updates?  I
am seeing the same thing as the reporter of this bug.

[root@peanut tmp]# ls /mnt/dist/slinux/
i386  SRPMS

[root@peanut tmp]# /usr/lib/anaconda-runtime/splitdistro --fileorder
/tmp/pkgorder /mnt/dist/ i386
Splitting tree...
Creating disc1...
Creating disc2...
Creating first source disc...
Creating second source disc...
Traceback (innermost last):
  File "/usr/lib/anaconda-runtime/splitdistro", line 179, in ?
    srcPkgList = os.listdir("%s/SRPMS" % disc1SrcDir)
OSError: [Errno 2] No such file or directory

[root@peanut tmp]# rpm -q anaconda-runtime anaconda
anaconda-runtime-7.2-7
anaconda-7.2-7

By applying the above patch the error go away, but all the SRPMS are being
placed in i386-disc3 (this is a different problem, but none the less it still
happens).  I understand this may be fixed in CVS as you stated it was being run
from the HEAD branch, but unfortunatly we don't have the HEAD branch.

I took a quick look at skipjack's anaconda and it appears to have the same
problem, but I have not verfied that yet.
Comment 10 Jeremy Katz 2002-04-04 16:25:35 EST
Ermm... you'd have a lot better luck using something like

/usr/lib/anaconda-runtime/splitdistro --fileorder /tmp/pkgorder /mnt/dist/slinux
i386

given what you showed me.  Really, I've done this quite a bit on 7.2 and
skipjack systems recently changing things so that everything fits on the correct
number of CDs and it all works exactly as designed.  You don't have to
explicitly create the SRPMS dir in disc1SrcDir because it gets created as a
side-effect of using cp -al to copy all of the files there.

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