Browse Source

dpkg: Use warningv() to print message when overriding with --force option

Guillem Jover 13 years ago
parent
commit
aecfb882c7
2 changed files with 3 additions and 3 deletions
  1. 2 0
      debian/changelog
  2. 1 3
      src/errors.c

+ 2 - 0
debian/changelog

@@ -10,6 +10,8 @@ dpkg (1.17.4) UNRELEASED; urgency=low
     reloading it from disk, otherwise removals in maintainer scripts will
     reloading it from disk, otherwise removals in maintainer scripts will
     not be seen during the current dpkg run.
     not be seen during the current dpkg run.
   * Get rid of dpkg-split global partqueue queue variable.
   * Get rid of dpkg-split global partqueue queue variable.
+  * Use warningv() in dpkg instead of ad-hoc printing message when
+    overriding with --force option.
 
 
  -- Guillem Jover <guillem@debian.org>  Thu, 05 Dec 2013 11:08:49 +0100
  -- Guillem Jover <guillem@debian.org>  Thu, 05 Dec 2013 11:08:49 +0100
 
 

+ 1 - 3
src/errors.c

@@ -139,9 +139,7 @@ void forcibleerr(int forceflag, const char *fmt, ...) {
   va_start(args, fmt);
   va_start(args, fmt);
   if (forceflag) {
   if (forceflag) {
     warning(_("overriding problem because --force enabled:"));
     warning(_("overriding problem because --force enabled:"));
-    fputc(' ', stderr);
-    vfprintf(stderr, fmt, args);
-    fputc('\n',stderr);
+    warningv(fmt, args);
   } else {
   } else {
     ohshitv(fmt, args);
     ohshitv(fmt, args);
   }
   }