Преглед на файлове

dpkg: Print the package version on main progress messages

This should help people diagnose problems by providing more context on
what's going on by being explicit about what packages is being handled.
Guillem Jover преди 13 години
родител
ревизия
d61f25455c
променени са 5 файла, в които са добавени 25 реда и са изтрити 14 реда
  1. 1 0
      debian/changelog
  2. 6 4
      src/archives.c
  3. 8 4
      src/remove.c
  4. 3 2
      src/trigproc.c
  5. 7 4
      src/unpack.c

+ 1 - 0
debian/changelog

@@ -53,6 +53,7 @@ dpkg (1.17.2) UNRELEASED; urgency=low
     the default might change in the future. Closes: #187019
   * Improve dpkg “Preparing to replace” and “Unpacking” progress messages.
     Closes: #32427, #71106
+  * Print the package version on main dpkg progress messages.
 
   [ Updated programs translations ]
   * German (Sven Joachim).

+ 6 - 4
src/archives.c

@@ -990,13 +990,15 @@ tarobject(void *ctx, struct tar_entry *ti)
 
       if (does_replace(tc->pkg, &tc->pkg->available,
                        otherpkg, &otherpkg->installed)) {
-        printf(_("Replacing files in old package %s ...\n"),
-               pkg_name(otherpkg, pnaw_nonambig));
+        printf(_("Replacing files in old package %s (%s) ...\n"),
+               pkg_name(otherpkg, pnaw_nonambig),
+               versiondescribe(&otherpkg->installed.version, vdew_nonambig));
         otherpkg->clientdata->replacingfilesandsaid = 1;
       } else if (does_replace(otherpkg, &otherpkg->installed,
                               tc->pkg, &tc->pkg->available)) {
-        printf(_("Replaced by files in installed package %s ...\n"),
-               pkg_name(otherpkg, pnaw_nonambig));
+        printf(_("Replaced by files in installed package %s (%s) ...\n"),
+               pkg_name(otherpkg, pnaw_nonambig),
+               versiondescribe(&otherpkg->installed.version, vdew_nonambig));
         otherpkg->clientdata->replacingfilesandsaid = 2;
         nifd->namenode->flags &= ~fnnf_new_inarchive;
         keepexisting = true;

+ 8 - 4
src/remove.c

@@ -161,7 +161,9 @@ void deferred_remove(struct pkginfo *pkg) {
   filesdbinit();
 
   if (f_noact) {
-    printf(_("Would remove or purge %s ...\n"), pkg_name(pkg, pnaw_nonambig));
+    printf(_("Would remove or purge %s (%s) ...\n"),
+           pkg_name(pkg, pnaw_nonambig),
+           versiondescribe(&pkg->installed.version, vdew_nonambig));
     pkg_set_status(pkg, stat_notinstalled);
     pkg->clientdata->istobe= itb_normal;
     return;
@@ -169,7 +171,8 @@ void deferred_remove(struct pkginfo *pkg) {
 
   oldconffsetflags(pkg->installed.conffiles);
 
-  printf(_("Removing %s ...\n"), pkg_name(pkg, pnaw_nonambig));
+  printf(_("Removing %s (%s) ...\n"), pkg_name(pkg, pnaw_nonambig),
+         versiondescribe(&pkg->installed.version, vdew_nonambig));
   log_action("remove", pkg, &pkg->installed);
   trig_activate_packageprocessing(pkg);
   if (pkg->status >= stat_halfconfigured) {
@@ -465,8 +468,9 @@ static void removal_bulk_remove_configfiles(struct pkginfo *pkg) {
   char *p;
   const char *const *ext;
 
-    printf(_("Purging configuration files for %s ...\n"),
-           pkg_name(pkg, pnaw_nonambig));
+    printf(_("Purging configuration files for %s (%s) ...\n"),
+           pkg_name(pkg, pnaw_nonambig),
+           versiondescribe(&pkg->installed.version, vdew_nonambig));
     log_action("purge", pkg, &pkg->installed);
     trig_activate_packageprocessing(pkg);
 

+ 3 - 2
src/trigproc.c

@@ -333,8 +333,9 @@ trigproc(struct pkginfo *pkg)
 		if (gaveup == pkg)
 			return;
 
-		printf(_("Processing triggers for %s ...\n"),
-		       pkg_name(pkg, pnaw_nonambig));
+		printf(_("Processing triggers for %s (%s) ...\n"),
+		       pkg_name(pkg, pnaw_nonambig),
+		       versiondescribe(&pkg->installed.version, vdew_nonambig));
 		log_action("trigproc", pkg, &pkg->installed);
 
 		varbuf_reset(&namesarg);

+ 7 - 4
src/unpack.c

@@ -734,12 +734,15 @@ void process_archive(const char *filename) {
     struct pkginfo *removing = deconpil->pkg_removal;
 
     if (removing)
-      printf(_("De-configuring %s, to allow removal of %s ...\n"),
+      printf(_("De-configuring %s (%s), to allow removal of %s (%s) ...\n"),
              pkg_name(deconpil->pkg, pnaw_nonambig),
-             pkg_name(removing, pnaw_nonambig));
+             versiondescribe(&deconpil->pkg->installed.version, vdew_nonambig),
+             pkg_name(removing, pnaw_nonambig),
+             versiondescribe(&removing->installed.version, vdew_nonambig));
     else
-      printf(_("De-configuring %s ...\n"),
-             pkg_name(deconpil->pkg, pnaw_nonambig));
+      printf(_("De-configuring %s (%s) ...\n"),
+             pkg_name(deconpil->pkg, pnaw_nonambig),
+             versiondescribe(&deconpil->pkg->installed.version, vdew_nonambig));
 
     trig_activate_packageprocessing(deconpil->pkg);
     pkg_set_status(deconpil->pkg, stat_halfconfigured);