commit 25a34ed0119b3604f50af89b383b12af69a92a4f Author: Pierre-Yves Chibon py@chibon.fr pingou@pingoured.fr Date: Tue Jun 7 15:25:01 2011 +0200
Revise the orphan --all procedure to reduce the number of call to pkgdb.
We are now using the PackageDB client from python-fedora to do mass orphan of all the packages for a given user.
pkgdb.py | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) --- diff --git a/pkgdb.py b/pkgdb.py index cf107c4..51d7e6e 100755 --- a/pkgdb.py +++ b/pkgdb.py @@ -642,11 +642,12 @@ def orphan_package(packagename, branch='devel', allpkgs=False, log.debug("Orphan all packages") if branch == "all": log.debug("Orphan in all branches") - branches = _get_active_branches() - for branch in branches: - _orphan_one_package(pkg, branch, username, password) + pkgdbclient.change_owner(pkgdbclient.username, 'orphan', + "*") else: - _orphan_one_package(pkg, branch, username, password) + log.debug("Orphan branch {0}".format(branch)) + pkgdbclient.change_owner(pkgdbclient.username, 'orphan', + "*", branch) elif re.match(packagename, pkg): log.debug("motif : {0}".format(motif)) log.debug("package : {0}".format(pkg))
packagedb-cli-commits@lists.stg.fedorahosted.org