浏览代码

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

Guillem Jover 12 年之前
父节点
当前提交
aecfb882c7
共有 2 个文件被更改,包括 3 次插入3 次删除
  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);
   }
   }