aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2006-11-13 16:36:22 +0000
committerOlivier Blin <oblin@mandriva.com>2006-11-13 16:36:22 +0000
commitff0c060f077628368f121800bd7da63330879061 (patch)
tree9e505c112953f3fcbfd232aa9f49c1d9294ccf18
parentfe33b467fea63fae1a8436803f7d34575fbf105d (diff)
downloadmgarepo-ff0c060f077628368f121800bd7da63330879061.tar
mgarepo-ff0c060f077628368f121800bd7da63330879061.tar.gz
mgarepo-ff0c060f077628368f121800bd7da63330879061.tar.bz2
mgarepo-ff0c060f077628368f121800bd7da63330879061.tar.xz
mgarepo-ff0c060f077628368f121800bd7da63330879061.zip
make get_srpm() verbose only when called from the getsrpm command
-rw-r--r--RepSys/commands/getsrpm.py1
-rw-r--r--RepSys/rpmutil.py6
2 files changed, 5 insertions, 2 deletions
diff --git a/RepSys/commands/getsrpm.py b/RepSys/commands/getsrpm.py
index a212b52..d76aca7 100644
--- a/RepSys/commands/getsrpm.py
+++ b/RepSys/commands/getsrpm.py
@@ -74,6 +74,7 @@ def parse_options():
if len(args) != 1:
raise Error, "invalid arguments"
opts.pkgdirurl = default_parent(args[0])
+ opts.verbose = 1
return opts
def main():
diff --git a/RepSys/rpmutil.py b/RepSys/rpmutil.py
index ac54046..ed62901 100644
--- a/RepSys/rpmutil.py
+++ b/RepSys/rpmutil.py
@@ -36,7 +36,8 @@ def get_srpm(pkgdirurl,
svnlog = 0,
scripts = [],
submit = False,
- template = None):
+ template = None,
+ verbose = 0):
svn = SVN(baseurl=pkgdirurl)
tmpdir = tempfile.mktemp()
topdir = "--define '_topdir %s'" % tmpdir
@@ -94,7 +95,8 @@ def get_srpm(pkgdirurl,
for targetdir in targetdirs:
targetsrpm = os.path.join(os.path.realpath(targetdir), os.path.basename(srpm))
targetsrpms.append(targetsrpm)
- sys.stderr.write("Wrote: %s\n" % targetsrpm)
+ if verbose:
+ sys.stderr.write("Wrote: %s\n" % targetsrpm)
execcmd("cp -f", srpm, targetdir)
os.unlink(srpm)
return targetsrpms