commit f8239ec214d6124f67a1f7a8080ff79453fd1c24
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Fri Sep 9 14:12:28 2011 +0200
We print that we don't find a package in the list only if we actually don't find it
(and not for every package in the list which is not the one searched...)
pkgdb-cli.py | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/pkgdb-cli.py b/pkgdb-cli.py
index 0304e73..0c8262a 100755
--- a/pkgdb-cli.py
+++ b/pkgdb-cli.py
@@ -790,6 +790,7 @@ def orphan_package(packagename, branch='devel', allpkgs=False,
if packagename is not None:
# transform the packagename to make it a regex
motif = "^" + packagename.replace("*", ".*") + "$"
+ found = False
for pkg in pkgs:
log.info("Package: {0}".format(pkg))
if allpkgs is True:
@@ -806,6 +807,7 @@ def orphan_package(packagename, branch='devel', allpkgs=False,
elif re.match(packagename, pkg):
log.debug("motif : {0}".format(motif))
log.debug("package : {0}".format(pkg))
+ found = True
if branch == "all":
log.debug("Orphan in all branches")
branches = _get_active_branches()
@@ -815,9 +817,9 @@ def orphan_package(packagename, branch='devel', allpkgs=False,
else:
_update_owner_one_package(packagename, branch, action="orphan",
username=username, password=password)
- else:
- print "Could not find {0} in the list of your packages".format(
- packagename)
+ if not found:
+ print "Could not find {0} in the list of your packages".format(
+ packagename)
def unorphan_package(packagename, branch='devel',