commit 3b472f903b722af795b804e64f0beb9f41271091
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue Jun 17 11:41:28 2014 +0200
Allow the `unorphan` action to be used to `give` a package to someone else
This brings back the behavior of pkgdb-cli 1.+ and correspond to what the
documentation says.
Fixes
https://fedorahosted.org/pkgdb2/ticket/23
pkgdb2_cli.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/pkgdb2_cli.py b/pkgdb2_cli.py
index 983bd14..4766e4b 100644
--- a/pkgdb2_cli.py
+++ b/pkgdb2_cli.py
@@ -521,10 +521,12 @@ def do_unorphan(args):
LOG.info("package : {0}".format(args.package))
LOG.info("branch : {0}".format(args.branch))
LOG.info("poc : {0}".format(args.poc))
+
if args.all is True:
pkgs = _get_user_packages(args.username)
else:
pkgs = [args.package]
+
if args.branch == 'all':
branches = _get_active_branch()
else:
@@ -535,7 +537,7 @@ def do_unorphan(args):
username = args.poc or args.username or pkgdbclient.username
LOG.info("new poc : {0}".format(username))
- output = pkgdbclient.unorphan_packages(pkgs, branches, username)
+ output = pkgdbclient.update_package_poc(pkgs, branches, username)
for msg in output.get('messages', []):
print msg