Bug#232317: [DOC] Inaccurate info about dpkg --compare-versions
Package: dpkg
Version: 1.10.18
Severity: minor
Tags: patch
Hello,
I think that the documentation of dpkg is not accurate enough about the
option --compare-versions and its handling no version. According to it,
I would first understand that :
$ dpkg --compare-versions gt 2
is allowed whereas an empty string is needed.
Here is a patch that should clarify it :
diff -u -r dpkg-1.10.18/main/main.c dpkg-1.10.18_new/main/main.c
--- dpkg-1.10.18/main/main.c 2003-10-25 22:03:21.000000000 +0200
+++ dpkg-1.10.18_new/main/main.c 2004-02-09 21:32:20.000000000 +0100
@@ -107,8 +107,8 @@
--abort-after <n> Abort after encountering <n> errors\n\
\n\
Comparison operators for --compare-versions are:\n\
- lt le eq ne ge gt (treat no version as earlier than any version);\n\
- lt-nl le-nl ge-nl gt-nl (treat no version as later than any version);\n\
+ lt le eq ne ge gt (treat empty version as earlier than any version);\n\
+ lt-nl le-nl ge-nl gt-nl (treat empty version as later than any version);\n\
< << <= = >= >> > (only for compatibility with control file syntax).\n\
\n\
Use `dselect' for user-friendly package management.\n"),
diff -u -r dpkg-1.10.18/man/en/dpkg.8.sgml dpkg-1.10.18_new/man/en/dpkg.8.sgml
--- dpkg-1.10.18/man/en/dpkg.8.sgml 2002-05-13 23:00:32.000000000 +0200
+++ dpkg-1.10.18_new/man/en/dpkg.8.sgml 2004-02-12 00:53:57.000000000 +0100
@@ -686,9 +686,9 @@
operator. <command>dpkg</command> returns success (zero result) if
the specified condition is satisfied, and failure (nonzero result)
otherwise. There are two groups of operators, which differ in how
- they treat a missing <option>ver1</option> or <option>ver2</option>.
- These treat no version as earlier than any version:
- <emphasis>lt le eq ne ge gt</emphasis>. These treat no version as
+ they treat an empty <option>ver1</option> or <option>ver2</option>.
+ These treat an empty version as earlier than any version:
+ <emphasis>lt le eq ne ge gt</emphasis>. These treat an empy version as
later than any version: <emphasis>lt-nl le-nl ge-nl gt-nl</emphasis>.
These are provided only for compatibility with
<filename>control</filename> file syntax: <emphasis>< <<
Fred
-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux hera 2.4.22 #1 Wed Nov 19 02:22:20 CET 2003 i686
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro
Versions of packages dpkg depends on:
ii dselect 1.10.18 a user tool to manage Debian packa
ii libc6 2.3.2.ds1-11 GNU C Library: Shared libraries an
-- no debconf information
Reply to: