Print debug message with version in each tool when --verbose is used
authorTomas Mlcoch <tmlcoch@redhat.com>
Tue, 12 May 2015 07:43:17 +0000 (09:43 +0200)
committerTomas Mlcoch <tmlcoch@redhat.com>
Tue, 12 May 2015 07:43:17 +0000 (09:43 +0200)
src/createrepo_c.c
src/mergerepo_c.c
src/modifyrepo_c.c
src/sqliterepo_c.c

index e1adb4b..ab39c65 100644 (file)
@@ -387,6 +387,11 @@ main(int argc, char **argv)
     // Set logging stuff
     cr_setup_logging(cmd_options->quiet, cmd_options->verbose);
 
+    // Emit debug message with version
+    g_debug("Version: %d.%d.%d\n", CR_VERSION_MAJOR,
+                                   CR_VERSION_MINOR,
+                                   CR_VERSION_PATCH);
+
     // Set paths of input and output repos
     in_repo = g_strconcat(in_dir, "repodata/", NULL);
 
index 1bef11a..1b2ae12 100644 (file)
@@ -1574,6 +1574,10 @@ main(int argc, char **argv)
         return 1;
     }
 
+    g_debug("Version: %d.%d.%d\n", CR_VERSION_MAJOR,
+                                   CR_VERSION_MINOR,
+                                   CR_VERSION_PATCH);
+
     g_thread_init(NULL); // Initialize threading
 
     // Prepare out_repo
index 646ed90..2b880e0 100644 (file)
@@ -274,6 +274,12 @@ main(int argc, char **argv)
 
     g_thread_init(NULL); // Initialize threading
 
+    // Emit debug message with version
+
+    g_debug("Version: %d.%d.%d\n", CR_VERSION_MAJOR,
+                                   CR_VERSION_MINOR,
+                                   CR_VERSION_PATCH);
+
     // Prepare list of tasks to do
 
     gchar *repodatadir = NULL;
index 3de5fd6..4c2e568 100644 (file)
@@ -1016,6 +1016,11 @@ main(int argc, char **argv)
         exit(EXIT_FAILURE);
     }
 
+    // Emit debug message with version
+    g_debug("Version: %d.%d.%d\n", CR_VERSION_MAJOR,
+                                   CR_VERSION_MINOR,
+                                   CR_VERSION_PATCH);
+
     g_thread_init(NULL); // Initialize threading
 
     // Gen the databases