diff options
author | Guillem Jover <guillem@debian.org> | 2014-03-27 20:08:13 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2014-04-21 17:00:28 +0200 |
commit | 97f282bc09a32d95df9596a1c6c4165c5ca4db52 (patch) | |
tree | e45a55d54fd323e82fdcb059f69d597f75fca88f /man | |
parent | a26fce6a81fbe2804e9fc28de172e9a6c69d1679 (diff) | |
download | dpkg-97f282bc09a32d95df9596a1c6c4165c5ca4db52.tar.gz |
dpkg: Add support for loading Packages-files from pipes or stdin
This allows loading Packages files in --update-avail and --merge-avail
from pipes, or stdin if the argument is omitted or is ‘-’.
Closes: #357093, #367297
Diffstat (limited to 'man')
-rw-r--r-- | man/dpkg.1 | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/man/dpkg.1 b/man/dpkg.1 index edda42176..12b5a63b5 100644 --- a/man/dpkg.1 +++ b/man/dpkg.1 @@ -214,14 +214,16 @@ option, which by default uses the \fBrpm\fP format, but that might change in the future, and as such programs parsing this command output should be explicit about the format they expect. .TP -\fB\-\-update\-avail\fP, \fB\-\-merge\-avail\fP \fIPackages-file\fP +\fB\-\-update\-avail\fP, \fB\-\-merge\-avail\fP [\fIPackages-file\fP] Update \fBdpkg\fP's and \fBdselect\fP's idea of which packages are available. With action \fB\-\-merge\-avail\fP, old information is combined with information from \fIPackages-file\fP. With action \fB\-\-update\-avail\fP, old information is replaced with the information in the \fIPackages-file\fP. The \fIPackages-file\fP distributed with -Debian is simply named \fIPackages\fP. \fBdpkg\fP keeps its -record of available packages in \fI/var/lib/dpkg/available\fP. +Debian is simply named \fIPackages\fP. If the \fIPackages-file\fP +argument is missing or named \fB-\fP then it will be read from +standard input (since dpkg 1.17.7). \fBdpkg\fP keeps its record of +available packages in \fI/var/lib/dpkg/available\fP. A simpler one-shot command to retrieve and update the \fIavailable\fR file is \fBdselect update\fR. Note that this file is mostly useless @@ -832,6 +834,10 @@ You might transfer this file to another computer, and after having updated the \fIavailable\fP file there with your package manager frontend of choice (see https://wiki.debian.org/Teams/Dpkg/FAQ for more details), for example: .br +\fB apt\-cache dumpavail | dpkg \-\-merge\-avail\fP +.br +or with dpkg 1.17.6 and earlier: +.br \fB avail=`mktemp`\fP \fB apt\-cache dumpavail >"$avail"\fP \fB dpkg \-\-merge\-avail "$avail"\fP |