Sfoglia il codice sorgente

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

Frank Lichtenheld 20 anni fa
parent
commit
32fab189c3
4 ha cambiato i file con 11 aggiunte e 1 eliminazioni
  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
     sh. Closes: #367329
   * Don't claim in dpkg man page that we set DPKG_OLD_CONFFILE and
   * 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.
     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 ]
   [ Nicolas François ]
   * fix typos in the Russian man pages. Thanks to Stepan Golosunov.
   * 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;
 					break;
 				}
 				}
 
 
-			if (!fip && pkg->installed.valid) {
+			if (!fip->name && pkg->installed.valid) {
 				const struct arbitraryfield* afp;
 				const struct arbitraryfield* afp;
 
 
 				for (afp=pkg->installed.arbs; afp; afp=afp->next)
 				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
 .fi
 
 
 The default format string is \(lq\fB${Package}\et${Version}\en\fP\(rq.
 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
 To get the name of the dpkg maintainer and the installed version, you could
 run:
 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>
 2006-05-17  Frank Lichtenheld  <djpig@debian.org>
 
 
 	* man/C/dpkg.1: We don't actually set
 	* man/C/dpkg.1: We don't actually set