---
cli/koji | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/cli/koji b/cli/koji
index febac19..83e1693 100755
--- a/cli/koji
+++ b/cli/koji
@@ -2933,6 +2933,7 @@ def handle_clone_tag(options, session, args):
parser.add_option("-v","--verbose", action="store_true", help=_("show changes"),)
parser.add_option("-f","--force", action="store_true", help=_("override tag locks if necessary"),)
parser.add_option("-n","--test", action="store_true", help=_("test mode"))
+ parser.add_option("-s","--skip-blocked", action="store_true", help=_("don't clone blocked packages"))
(options, args) = parser.parse_args(args)
if len(args) != 2:
@@ -2975,8 +2976,9 @@ def handle_clone_tag(options, session, args):
# for each package add one entry in the new tag.
chgpkglist.append(('[new]',pkgs['package_name'],pkgs['blocked'],pkgs['owner_name'],pkgs['tag_name']))
if not options.test:
- # add packages.
- session.packageListAdd(newtag['name'],pkgs['package_name'],
+ # add packages and eventually skip if blocked
+ if not (options.skip_blocked and pkgs['blocked']):
+ session.packageListAdd(newtag['name'],pkgs['package_name'],
owner=pkgs['owner_name'],block=pkgs['blocked'],
extra_arches=pkgs['extra_arches'])
# get --all latest builds from src tag
@@ -3074,7 +3076,8 @@ def handle_clone_tag(options, session, args):
pkg['blocked'],pkg['owner_name'],
pkg['tag_name']))
if not options.test:
- session.packageListAdd(dsttag['name'],pkg['package_name'],
+ if not (options.skip_blocked and pkgs['blocked']):
+ session.packageListAdd(dsttag['name'],pkg['package_name'],
owner=pkg['owner_name'],
block=pkg['blocked'],
extra_arches=pkg['extra_arches'])
--
1.7.7.6