pld-ftp-admin: scripts/gen-indexes.py More quiet actions.
arekm
arekm at pld-linux.org
Sat Jan 15 16:57:50 CET 2011
Author: arekm Date: Sat Jan 15 15:57:50 2011 GMT
Module: pld-ftp-admin Tag: HEAD
---- Log message:
More quiet actions.
---- Files affected:
pld-ftp-admin/scripts:
gen-indexes.py (1.29 -> 1.30)
---- Diffs:
================================================================
Index: pld-ftp-admin/scripts/gen-indexes.py
diff -u pld-ftp-admin/scripts/gen-indexes.py:1.29 pld-ftp-admin/scripts/gen-indexes.py:1.30
--- pld-ftp-admin/scripts/gen-indexes.py:1.29 Sat Jan 15 16:52:22 2011
+++ pld-ftp-admin/scripts/gen-indexes.py Sat Jan 15 16:57:45 2011
@@ -84,7 +84,7 @@
os.system('%s -s %s%s/%s/debuginfo/ --mkidxz --mkidx-type pdir' % (poldek, ftp_dir, tree, arch))
if do_yum:
- os.system('set -x; cd %s.stat/repodata && cvs up comps.xml' % ftp_dir)
+ os.system('%s cd %s.stat/repodata && cvs %s up comps.xml' % ("" if do_quiet else "set -x;", ftp_dir, "" if do_quiet else "-Q")
yum = '%s.stat/bin/createrepo -d -g %s.stat/repodata/comps.xml' % (ftp_dir, ftp_dir)
for tree in trees:
print '\n-------------------------- %s --------------------------' % tree
@@ -92,21 +92,23 @@
for arch in all_ftp_archs:
print '\ngenerate repodata for %s using createrepo' % arch
# Creating indexes for yum and other supporting xml repodata.
- os.system('time %s --cache %s-%s %s%s/%s/RPMS' % (yum, cachedir, arch, ftp_dir, tree, arch))
+ os.system('%s %s --cache %s-%s %s%s/%s/RPMS' % ("" if do_quiet else "time", yum, cachedir, arch, ftp_dir, tree, arch))
if arch != 'noarch' and config.separate_debuginfo:
- os.system('time %s --cache %s-%s %s%s/%s/debuginfo' % (yum, cachedir, arch, ftp_dir, tree, arch))
+ os.system('%s %s --cache %s-%s %s%s/%s/debuginfo' % ("" if do_quiet else "time", yum, cachedir, arch, ftp_dir, tree, arch))
if do_rpmrepo:
- os.system('set -x; cd %s.stat/repodata && cvs up comps.xml' % ftp_dir)
+ os.system('%s cd %s.stat/repodata && cvs %s up comps.xml' % ("" if do_quiet else "set -x;", ftp_dir, "" if do_quiet else "-Q")
for tree in trees:
print '\n-------------------------- %s --------------------------' % tree
for arch in all_ftp_archs:
dir = '%s/%s/%s/RPMS' % (ftp_dir, tree, arch)
- print '\ngenerate repodata for %s using rpmrepo (in %s)' % (arch, dir)
- os.system('time rpmrepo %s -o %s' % (dir, dir))
- print 'copy comps.xml'
+ if not do_quiet:
+ print '\ngenerate repodata for %s using rpmrepo (in %s)' % (arch, dir)
+ os.system('%s rpmrepo %s -o %s' % ("" if do_quiet else "set -x;", dir, dir))
+ if not do_quiet:
+ print 'copy comps.xml'
comps = '%s.stat/repodata/comps.xml' % ftp_dir
- os.system('set -x; cp -p %s %s/repodata' % (comps, dir))
+ os.system('%s cp -p %s %s/repodata' % ("" if do_quiet else "set -x;", comps, dir))
for tree in trees:
ftpio.unlock(tree)
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-ftp-admin/scripts/gen-indexes.py?r1=1.29&r2=1.30&f=u
More information about the pld-cvs-commit
mailing list