The following commit has been merged in the master branch:
commit 6fade1987b2a59b53a4f31c17fe5ba6ede9cf4a1
Author: Guillem Jover <guil...@debian.org>
Date:   Wed Feb 1 02:55:18 2012 +0100

    dpkg: Pass struct pkgbin to log_action()

diff --git a/src/configure.c b/src/configure.c
index ee6bb24..151564c 100644
--- a/src/configure.c
+++ b/src/configure.c
@@ -311,7 +311,7 @@ deferred_configure(struct pkginfo *pkg)
 
        printf(_("Setting up %s (%s) ...\n"), pkg->set->name,
               versiondescribe(&pkg->installed.version, vdew_nonambig));
-       log_action("configure", pkg);
+       log_action("configure", pkg, &pkg->installed);
 
        trig_activate_packageprocessing(pkg);
 
diff --git a/src/help.c b/src/help.c
index b5a091a..42c68ba 100644
--- a/src/help.c
+++ b/src/help.c
@@ -642,7 +642,9 @@ void ensure_pathname_nonexisting(const char *pathname) {
   subproc_wait_check(pid, "rm cleanup", 0);
 }
 
-void log_action(const char *action, struct pkginfo *pkg) {
+void
+log_action(const char *action, struct pkginfo *pkg, struct pkgbin *pkgbin)
+{
   log_message("%s %s %s %s", action, pkg->set->name,
              versiondescribe(&pkg->installed.version, vdew_nonambig),
              versiondescribe(&pkg->available.version, vdew_nonambig));
diff --git a/src/main.h b/src/main.h
index ff006f8..afbfca0 100644
--- a/src/main.h
+++ b/src/main.h
@@ -256,7 +256,7 @@ bool dir_is_used_by_pkg(struct filenamenode *namenode, 
struct pkginfo *pkg,
                         struct fileinlist *list);
 bool dir_has_conffiles(struct filenamenode *namenode, struct pkginfo *pkg);
 
-void log_action(const char *action, struct pkginfo *pkg);
+void log_action(const char *action, struct pkginfo *pkg, struct pkgbin 
*pkgbin);
 
 /* from trigproc.c */
 
diff --git a/src/processarc.c b/src/processarc.c
index b151c5e..9290828 100644
--- a/src/processarc.c
+++ b/src/processarc.c
@@ -342,7 +342,7 @@ pkg_disappear(struct pkginfo *pkg, struct pkginfo *infavour)
 {
   printf(_("(Noting disappearance of %s, which has been completely 
replaced.)\n"),
          pkg->set->name);
-  log_action("disappear", pkg);
+  log_action("disappear", pkg, &pkg->installed);
   debug(dbg_general, "pkg_disappear disappearing %s", pkg->set->name);
 
   trig_activate_packageprocessing(pkg);
@@ -554,10 +554,10 @@ void process_archive(const char *filename) {
            pkg->set->name,
            versiondescribe(&pkg->installed.version,vdew_nonambig),
            pfilename);
-    log_action("upgrade", pkg);
+    log_action("upgrade", pkg, &pkg->installed);
   } else {
     printf(_("Unpacking %s (from %s) ...\n"), pkg->set->name, pfilename);
-    log_action("install", pkg);
+    log_action("install", pkg, &pkg->available);
   }
 
   if (f_noact) {
diff --git a/src/remove.c b/src/remove.c
index 9d633e7..3b8bd1a 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -155,7 +155,7 @@ void deferred_remove(struct pkginfo *pkg) {
   oldconffsetflags(pkg->installed.conffiles);
 
   printf(_("Removing %s ...\n"), pkg->set->name);
-  log_action("remove", pkg);
+  log_action("remove", pkg, &pkg->installed);
   trig_activate_packageprocessing(pkg);
   if (pkg->status >= stat_halfconfigured) {
     static enum pkgstatus oldpkgstatus;
@@ -407,7 +407,7 @@ static void removal_bulk_remove_configfiles(struct pkginfo 
*pkg) {
   const char *const *ext;
 
     printf(_("Purging configuration files for %s ...\n"), pkg->set->name);
-    log_action("purge", pkg);
+    log_action("purge", pkg, &pkg->installed);
     trig_activate_packageprocessing(pkg);
 
     /* We may have modified this above. */
diff --git a/src/trigproc.c b/src/trigproc.c
index c5b231c..257a7eb 100644
--- a/src/trigproc.c
+++ b/src/trigproc.c
@@ -315,7 +315,7 @@ trigproc(struct pkginfo *pkg)
                        return;
 
                printf(_("Processing triggers for %s ...\n"), pkg->set->name);
-               log_action("trigproc", pkg);
+               log_action("trigproc", pkg, &pkg->installed);
 
                varbuf_reset(&namesarg);
                for (tp = pkg->trigpend_head; tp; tp = tp->next) {

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to