Hello all,
Goal:
----
I am trying to create a 5 discs fedora core 5 - FC5 distribution based on a
single DVD image. In order to save disk space I would like to create a
unified tree with symlinks to packages rather than the real rpm files.
Problem:
-------
When I run splittree.py on the tree populated with symlinks here is what I
get:
$ /usr/lib/anaconda-runtime/splittree.py \
--arch=i386 \
--total-discs=5 \
--bin-discs=5 \
--src-discs=0 \
--srcdir=/usr/local/src/cs-fedora/SRPMS \
--release-string="Fedora Core 5" \
--pkgorderfile=/usr/local/src/cs-fedora/pkgfile.txt \
--distdir=/usr/local/src/cs-fedora/i386 \
--productpath=Fedora
First package on disc1: kernel-2.6.17-1.2139_FC5.i686.rpm
Last package on disc1 : lucene-javadoc-1.4.3-1jpp_11fc.i386.rpm
i386-disc1 size: 133M
Files and links to packages in Fedora/RPMS only take up to 133M! The package
size calculation does not follow symlinks. So they all fit on the first
disc. Obviously not what I want.
Solution:
--------
Below is a simple patch that follows symlink for calculation of file size.
With this patch applied I actually obtain the 5 discs filled up with proper
links to packages... and saving quite a bit of disk space.
$ /usr/lib/anaconda-runtime/splittree.py \
--arch=i386 \
--total-discs=5 \
--bin-discs=5 \
--src-discs=0 \
--srcdir=/usr/local/src/cs-fedora/SRPMS \
--release-string="Fedora Core 5" \
--pkgorderfile=/usr/local/src/cs-fedora/pkgfile.txt \
--distdir=/usr/local/src/cs-fedora/i386 \
--productpath=Fedora
First package on disc1: kernel-2.6.17-1.2139_FC5.i686.rpm
Last package on disc1 : evolution-sharp-0.10.2-9.3.i386.rpm
i386-disc1 size: 629M
First package on disc2: mono-data-1.1.13.7-1.fc5.1.i386.rpm
Last package on disc2 : ant-apache-oro-1.6.5-1jpp_7fc.i386.rpm
i386-disc2 size: 623M
First package on disc3: eclipse-platform-3.1.2-1jpp_15fc.i386.rpm
Last package on disc3 : kdeedu-devel-3.5.3-0.1.fc5.i386.rpm
i386-disc3 size: 640M
First package on disc4: xfsprogs-2.7.3-1.2.1.i386.rpm
Last package on disc4 : slrn-pull-0.9.8.1pl1-1.2.1.i386.rpm
i386-disc4 size: 621M
First package on disc5: thunderbird-1.5.0.4-1.1.fc5.i386.rpm
Last package on disc5 : lucene-javadoc-1.4.3-1jpp_11fc.i386.rpm
i386-disc5 size: 603M
Hope this helps!
__
Eric
--- splittree.py.orig 2006-06-19 09:46:35.000000000 -0700
+++ splittree.py 2006-06-28 22:35:24.000000000 -0700
@@ -107,13 +107,13 @@
"""Gets the size as reported by du -s"""
if blocksize:
- p = os.popen("du -s --block-size=1 %s" % path, 'r')
+ p = os.popen("du -sL --block-size=1 %s" % path, 'r')
thesize = p.read()
p.close()
thesize = long(string.split(thesize)[0])
return thesize
else:
- p = os.popen("du -sh %s" % path, 'r')
+ p = os.popen("du -shL %s" % path, 'r')
thesize = p.read()
p.close()
thesize = string.split(thesize)[0]