The following commit has been merged in the master branch:
commit fd84ba8969bf305d97c225b44858965e53a0cb66
Author: Guillem Jover <guil...@debian.org>
Date:   Sat Oct 16 07:35:27 2010 +0200

    Use thisname variable instead of hard-coded 'dpkg' string
    
    This corrects the current program name printed by other tools.

diff --git a/lib/dpkg/ehandle.c b/lib/dpkg/ehandle.c
index a5c4349..b630bf5 100644
--- a/lib/dpkg/ehandle.c
+++ b/lib/dpkg/ehandle.c
@@ -163,7 +163,8 @@ run_cleanups(struct error_context *econ, int flagsetin)
      
   if (++preventrecurse > 3) {
     onerr_abort++;
-    fprintf(stderr, _("dpkg: too many nested errors during error recovery 
!!\n"));
+    fprintf(stderr, _("%s: too many nested errors during error recovery!!\n"),
+            thisname);
     flagset= 0;
   } else {
     flagset= flagsetin;
diff --git a/src/errors.c b/src/errors.c
index 88c2210..3b4ceac 100644
--- a/src/errors.c
+++ b/src/errors.c
@@ -58,13 +58,15 @@ void print_error_perpackage(const char *emsg, const char 
*arg) {
   struct error_report *nr;
   
   fprintf(stderr, _("%s: error processing %s (--%s):\n %s\n"),
-          DPKG, arg, cipaction->olong, emsg);
+          thisname, arg, cipaction->olong, emsg);
 
   statusfd_send("status: %s : %s : %s", arg, "error", emsg);
 
   nr= malloc(sizeof(struct error_report));
   if (!nr) {
-    perror(_("dpkg: failed to allocate memory for new entry in list of failed 
packages."));
+    fprintf(stderr,
+            _("%s: failed to allocate memory for new entry in list of failed 
packages: %s"),
+            thisname, strerror(errno));
     abort_processing = true;
     nr= &emergency;
   }
@@ -74,7 +76,7 @@ void print_error_perpackage(const char *emsg, const char 
*arg) {
   lastreport= &nr->next;
     
   if (nerrs++ < errabort) return;
-  fprintf(stderr, _("dpkg: too many errors, stopping\n"));
+  fprintf(stderr, _("%s: too many errors, stopping\n"), thisname);
   abort_processing = true;
 }
 
diff --git a/src/querycmd.c b/src/querycmd.c
index bb7b942..4558ccf 100644
--- a/src/querycmd.c
+++ b/src/querycmd.c
@@ -289,7 +289,7 @@ searchfiles(const char *const *argv)
       iterfileend(it);
     }
     if (!found) {
-      fprintf(stderr,_("dpkg: %s not found.\n"),thisarg);
+      fprintf(stderr, _("%s: %s not found.\n"), thisname, thisarg);
       failures++;
       m_output(stderr, _("<standard error>"));
     } else {
diff --git a/src/trigproc.c b/src/trigproc.c
index 833fb28..1490d61 100644
--- a/src/trigproc.c
+++ b/src/trigproc.c
@@ -245,7 +245,7 @@ check_trigger_cycle(struct pkginfo *processing_now)
        /* Oh dear. hare is a superset of tortoise. We are making no progress. 
*/
        fprintf(stderr, _("%s: cycle found while processing triggers:\n chain 
of"
                " packages whose triggers are or may be responsible:\n"),
-               DPKG);
+               thisname);
        sep = "  ";
        for (tcn = tortoise; tcn; tcn = tcn->next) {
                fprintf(stderr, "%s%s", sep, tcn->then_processed->name);

-- 
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