Explorar el Código

Fix printing of user defined fields with --showformat and
document the existance of this feature in dpkg-query man page.

Frank Lichtenheld hace 20 años
padre
commit
32fab189c3
Se han modificado 4 ficheros con 11 adiciones y 1 borrados
  1. 2 0
      debian/changelog
  2. 1 1
      lib/showpkg.c
  3. 3 0
      man/C/dpkg-query.1
  4. 5 0
      man/ChangeLog

+ 2 - 0
debian/changelog

@@ -34,6 +34,8 @@ dpkg (1.13.20~) UNRELEASED; urgency=low
     sh. Closes: #367329
   * Don't claim in dpkg man page that we set DPKG_OLD_CONFFILE and
     DPKG_NEW_CONFFILE on sub shells since we actually don't.
+  * Fix printing of user defined fields with --showformat and
+    document the existance of this feature in dpkg-query man page.
 
   [ Nicolas François ]
   * fix typos in the Russian man pages. Thanks to Stepan Golosunov.

+ 1 - 1
lib/showpkg.c

@@ -238,7 +238,7 @@ void show1package(const struct lstitem* head, struct pkginfo *pkg) {
 					break;
 				}
 
-			if (!fip && pkg->installed.valid) {
+			if (!fip->name && pkg->installed.valid) {
 				const struct arbitraryfield* afp;
 
 				for (afp=pkg->installed.arbs; afp; afp=afp->next)

+ 3 - 0
man/C/dpkg-query.1

@@ -153,6 +153,9 @@ alignment will be used. The following \fIfield\fRs are recognised:
 .fi
 
 The default format string is \(lq\fB${Package}\et${Version}\en\fP\(rq.
+Actually, all other fields found in the status file (i.e. user defined
+fields) can be requested, too. They will be printed as-is, though, no
+conversion nor error checking is done on them.
 To get the name of the dpkg maintainer and the installed version, you could
 run:
 

+ 5 - 0
man/ChangeLog

@@ -1,3 +1,8 @@
+2006-05-18  Frank Lichtenheld  <djpig@debian.org>
+
+	* man/C/dpkg-query.1: Document that user defined
+	fields can also be printed with --showformat.
+
 2006-05-17  Frank Lichtenheld  <djpig@debian.org>
 
 	* man/C/dpkg.1: We don't actually set