diff options
| author | Chris Lumens <clumens@redhat.com> | 2005-05-16 16:11:52 +0000 |
|---|---|---|
| committer | Chris Lumens <clumens@redhat.com> | 2005-05-16 16:11:52 +0000 |
| commit | b88feed44d5402d8474555deedf76b47ccd649d0 (patch) | |
| tree | 565d7e75f16064fa765b55076ee186f5143dd189 /scripts | |
| parent | e0baf665499405e4f652e3a92d7791cd35ce32e3 (diff) | |
Applied a bun of patches from David Kuestler to fix splittree.py problems.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/splittree.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/splittree.py b/scripts/splittree.py index d41bf865a..d65c642a5 100644 --- a/scripts/splittree.py +++ b/scripts/splittree.py @@ -103,14 +103,14 @@ self.reserve_size : Additional size needed to be reserved on the first disc. self.logfile = [] - def getSize(seld, path, blocksize=None): + def getSize(self, path, blocksize=None): """Gets the size as reported by du -s""" if blocksize: p = os.popen("du -s --block-size=1 %s" % path, 'r') thesize = p.read() p.close() - thesize = int(string.split(thesize)[0]) + thesize = long(string.split(thesize)[0]) return thesize else: p = os.popen("du -sh %s" % path, 'r') @@ -199,12 +199,12 @@ self.reserve_size : Additional size needed to be reserved on the first disc. for i in range(self.bin_list[0], self.bin_list[-1] + 1): if i == 1: - p = os.popen('find %s -type f -not -name .discinfo' % self.dist_dir, 'r') + p = os.popen('find %s/ -type f -not -name .discinfo' % self.dist_dir, 'r') filelist = p.read() p.close() filelist = string.split(filelist) - p = os.popen('find %s -type d -not -name RPMS -not -name SRPMS' % self.dist_dir, 'r') + p = os.popen('find %s/ -type d -not -name RPMS -not -name SRPMS' % self.dist_dir, 'r') dirlist = p.read() p.close() dirlist = string.split(dirlist) @@ -392,7 +392,7 @@ self.reserve_size : Additional size needed to be reserved on the first disc. def usage(theerror): print theerror - print """Usage: %s --arch=i386 --total-discs=6 --bin-discs=3 --src-discs=3 --release-string="distro name" --pkgorderfile=/tmp/pkgorder.12345 --distdir=/usr/src/someunifiedtree --srcdir=/usr/src/someunifiedtree/SRPMS --productpath=product""" % sys.argv[0] + print """Usage: %s --arch=i386 --total-discs=8 --bin-discs=4 --src-discs=4 --release-string="distro name" --pkgorderfile=/tmp/pkgorder.12345 --distdir=/usr/src/someunifiedtree --srcdir=/usr/src/someunifiedtree/SRPMS --productpath=product""" % sys.argv[0] sys.exit(1) |
