浏览代码

dpkg: Use badusage() on illegal package names in --ignore-depends

Guillem Jover 12 年之前
父节点
当前提交
25d6273c1a
共有 2 个文件被更改,包括 5 次插入3 次删除
  1. 2 0
      debian/changelog
  2. 3 3
      src/main.c

+ 2 - 0
debian/changelog

@@ -58,6 +58,8 @@ dpkg (1.17.10) UNRELEASED; urgency=low
   * Do not assume that sensible-editor is present on «dpkg-source --commit»,
     as that command is very Debian specific. Fallback to try VISUAL, EDITOR,
     or vi, if the previous commands are either unset or not found.
+  * Use badusage() instead of ohshit() on dpkg --ignore-depends argument
+    parsing errors.
 
   [ Updated programs translations ]
   * Catalan (Guillem Jover).

+ 3 - 3
src/main.c

@@ -3,7 +3,7 @@
  * main.c - main program
  *
  * Copyright © 1994,1995 Ian Jackson <ian@chiark.greenend.org.uk>
- * Copyright © 2006-2012 Guillem Jover <guillem@debian.org>
+ * Copyright © 2006-2014 Guillem Jover <guillem@debian.org>
  * Copyright © 2010 Canonical Ltd.
  *   written by Martin Pitt <martin.pitt@canonical.com>
  *
@@ -375,8 +375,8 @@ set_ignore_depends(const struct cmdinfo *cip, const char *value)
 
     pkg = pkg_spec_parse_pkg(p, &err);
     if (pkg == NULL)
-      ohshit(_("--%s needs a valid package name but '%.250s' is not: %s"),
-              cip->olong, p, err.str);
+      badusage(_("--%s needs a valid package name but '%.250s' is not: %s"),
+               cip->olong, p, err.str);
 
     pkg_list_prepend(&ignoredependss, pkg);