diff options
author | Guillem Jover <guillem@debian.org> | 2010-10-16 07:35:27 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2010-11-19 05:21:13 +0100 |
commit | fd84ba8969bf305d97c225b44858965e53a0cb66 (patch) | |
tree | 2f1e9e5e5694a13c29ed3bc907867a78f14b1a76 /src | |
parent | dc98261980767f258046f8a4c2e020fcdc92c8b6 (diff) | |
download | dpkg-fd84ba8969bf305d97c225b44858965e53a0cb66.tar.gz |
Use thisname variable instead of hard-coded 'dpkg' string
This corrects the current program name printed by other tools.
Diffstat (limited to 'src')
-rw-r--r-- | src/errors.c | 8 | ||||
-rw-r--r-- | src/querycmd.c | 2 | ||||
-rw-r--r-- | src/trigproc.c | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/errors.c b/src/errors.c index 88c2210ca..3b4ceac53 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 bb7b94211..4558ccf79 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 833fb28cb..1490d61a9 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); |