The following commit has been merged in the master branch:
commit cc9fc4d628664a69351f4a77b70baebb59c0a6e4
Author: Guillem Jover <[email protected]>
Date: Sun Sep 6 08:35:29 2009 +0200
dpkg: Use ohshit on bad version syntax in --compare-versions
diff --git a/debian/changelog b/debian/changelog
index e29bb00..5820bbb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -47,6 +47,7 @@ dpkg (1.15.4) UNRELEASED; urgency=low
* Allow quoting values in configuration file options.
* Add new --pre-invoke and --post-invoke hooks in dpkg.
* Add new --control-path command to dpkg-query.
+ * Use ohshit on bad version syntax in --compare-versions.
[ Raphael Hertzog ]
* Replace install-info by a wrapper around GNU's install-info. The wrapper
diff --git a/src/enquiry.c b/src/enquiry.c
index bcf374a..60a39d3 100644
--- a/src/enquiry.c
+++ b/src/enquiry.c
@@ -443,21 +443,15 @@ void cmpversions(const char *const *argv) {
if (*argv[0] && strcmp(argv[0],"<unknown>")) {
emsg= parseversion(&a,argv[0]);
- if (emsg) {
- printf(_("dpkg: version '%s' has bad syntax: %s\n"), argv[0], emsg);
- m_output(stdout, _("<standard output>"));
- exit(1);
- }
+ if (emsg)
+ ohshit(_("version '%s' has bad syntax: %s"), argv[0], emsg);
} else {
blankversion(&a);
}
if (*argv[2] && strcmp(argv[2],"<unknown>")) {
emsg= parseversion(&b,argv[2]);
- if (emsg) {
- printf(_("dpkg: version '%s' has bad syntax: %s\n"), argv[2], emsg);
- m_output(stdout, _("<standard output>"));
- exit(1);
- }
+ if (emsg)
+ ohshit(_("version '%s' has bad syntax: %s"), argv[2], emsg);
} else {
blankversion(&b);
}
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]