mergerepo_c: Implicitly use --all with --koji.
authorTomas Mlcoch <tmlcoch@redhat.com>
Mon, 15 Apr 2013 06:42:45 +0000 (08:42 +0200)
committerTomas Mlcoch <tmlcoch@redhat.com>
Mon, 15 Apr 2013 06:42:45 +0000 (08:42 +0200)
src/mergerepo_c.c

index 8ca5fda..1655e4a 100644 (file)
@@ -334,7 +334,9 @@ check_arguments(struct CmdOptions *options)
 
     // Merge method
     if (options->merge_method_str) {
-        if (!g_strcmp0(options->merge_method_str, "repo")) {
+        if (options->koji) {
+            g_message("With -k/--koji argument merge method is ignored (--all is implicitly used).");
+        } else if (!g_strcmp0(options->merge_method_str, "repo")) {
             options->merge_method = MM_REPO;
         } else if (!g_strcmp0(options->merge_method_str, "ts")) {
             options->merge_method = MM_TIMESTAMP;
@@ -352,6 +354,9 @@ check_arguments(struct CmdOptions *options)
     }
 
     // Koji arguments
+    if (options->koji)
+        options->all = TRUE;
+
     if (options->blocked) {
         if (!options->koji) {
             g_critical("-b/--blocked cannot be used without -k/--koji argument");