craterepo_c: Gen empty repo if empty pkglist is used
authorTomas Mlcoch <tmlcoch@redhat.com>
Thu, 9 Oct 2014 13:14:21 +0000 (15:14 +0200)
committerTomas Mlcoch <tmlcoch@redhat.com>
Thu, 9 Oct 2014 13:14:21 +0000 (15:14 +0200)
src/createrepo_c.c

index 18f78fc..2f054b1 100644 (file)
@@ -134,7 +134,9 @@ fill_pool(GThreadPool *pool,
     struct PoolTask *task;
     long package_count = 0;
 
-    if (!(cmd_options->include_pkgs)) {
+    if (cmd_options->pkglist && !cmd_options->include_pkgs) {
+        g_warning("Used pkglist doesn't contain any useful items");
+    } else if (!(cmd_options->include_pkgs)) {
         // --pkglist (or --includepkg) is not supplied -> do dir walk
 
         g_message("Directory walk started");