瀏覽代碼

dpkg-query(1): Document the --control-path life expectancy

There's still at least one scenario that can only be covered by
--control-path, and as long as that's the case the command will
not get removed.

Ref: #699647
Guillem Jover 12 年之前
父節點
當前提交
9f13845ac1
共有 3 個文件被更改,包括 13 次插入3 次删除
  1. 1 0
      debian/changelog
  2. 3 1
      doc/README.feature-removal-schedule
  3. 9 2
      man/dpkg-query.1

+ 1 - 0
debian/changelog

@@ -6,6 +6,7 @@ dpkg (1.17.7) UNRELEASED; urgency=low
       always used. Closes: #737731
       always used. Closes: #737731
     - Clarify in deb-control(5) «Multi-Arch: no» field omission.
     - Clarify in deb-control(5) «Multi-Arch: no» field omission.
     - Clarify in dpkg-buildpackage(1) --check-option description.
     - Clarify in dpkg-buildpackage(1) --check-option description.
+    - Document dpkg-query --control-path life expectancy. See: #699647
 
 
   [ Updated dpkg translations ]
   [ Updated dpkg translations ]
   * German (Sven Joachim).
   * German (Sven Joachim).

+ 3 - 1
doc/README.feature-removal-schedule

@@ -60,7 +60,9 @@ When: 1.18.x
 Warning: man page
 Warning: man page
  This was a semi-public interface now superceded by --control-list and
  This was a semi-public interface now superceded by --control-list and
  --control-show, which are a better interface as they do not rely on any
  --control-show, which are a better interface as they do not rely on any
- specific database layout.
+ specific database layout. Although there might still be cases where it's
+ required to avoid hardcoding the database layout, and it will be kept as
+ long as there's legitimate uses for it and no viable replacements.
 
 
 What: --new, --old (dpkg-deb options)
 What: --new, --old (dpkg-deb options)
 Status: deprecated
 Status: deprecated

+ 9 - 2
man/dpkg-query.1

@@ -118,8 +118,15 @@ to the standard output.
 .BR \-c ", " \-\-control\-path " \fIpackage-name\fP [\fIcontrol-file\fP]"
 .BR \-c ", " \-\-control\-path " \fIpackage-name\fP [\fIcontrol-file\fP]"
 List paths for control files installed to your system from \fIpackage-name\fP.
 List paths for control files installed to your system from \fIpackage-name\fP.
 If \fIcontrol-file\fP is specified then only list the path for that control
 If \fIcontrol-file\fP is specified then only list the path for that control
-file if it is present. \fBWarning\fP: this command is deprecated, please
-switch to use \fB\-\-control\-list\fP and \fB\-\-control\-show\fP instead.
+file if it is present.
+
+\fBWarning\fP: this command is deprecated as it gives direct access to the
+internal dpkg database, please switch to use \fB\-\-control\-list\fP and
+\fB\-\-control\-show\fP instead for all cases where those commands might
+give the same end result. Although there is still at least one case where
+this command is needed (i.e. when having to remove a damaging postrm
+maintainer script), and as long as there is no good solution for that,
+this command will not get removed.
 .TP
 .TP
 .BR \-S ", " \-\-search " \fIfilename-search-pattern\fP..."
 .BR \-S ", " \-\-search " \fIfilename-search-pattern\fP..."
 Search for packages that own files corresponding to the given pattern.
 Search for packages that own files corresponding to the given pattern.