1

Where does documentation for apt source live?

  1. apt source --help doesn't print any usage information, nor does it mention the source subcommand.

  2. The manpage apt(8) doesn't mention the existence of the source subcommand. It gives an excuse and keeps us wondering what documentation it is trying to avoid duplicating:

    Much like apt itself, its manpage is intended as an end user interface and as such only mentions the most used commands and options partly to not duplicate information in multiple places and partly to avoid overwhelming readers with a cornucopia of options and details.

    Indeed, I am definitely not overwhelmed.

  3. The manpage "See Also" section directs us to the APT User's Guide which might say less than the manpage does.

  4. It also directs us to the APT HOWTO which is boldly labeled OBSOLETE but it does at least describe apt-get source, a related command that probably has the same behaviors.

  5. Lastly there is the source code which doesn't really count as documentation, but tells us which configuration options. Oh hey, there's a --print-uris command line flag.

1 Answer 1

1

It lives in the apt-get(8) manpage. From the manpage of apt:

All features of apt(8) are available in dedicated APT tools like apt-get(8) and apt-
cache(8) as well.  apt(8) just changes the default value of some options (see apt.conf(5)
and specifically the Binary scope). So you should prefer using these commands (potentially
with some additional options enabled) in your scripts as they keep backward compatibility
as much as possible.

So if some subcommand is not explicitly listed out in the manpage, you're expected the manpages of apt-get and apt-cache, so it's quite explicitly trying to avoid duplication of documentation of these commands.

And from man apt-get:

source
   source causes apt-get to fetch source packages. APT will examine the available
   packages to decide which source package to fetch. It will then find and download into
   the current directory the newest available version of that source package while
   respecting the default release, set with the option APT::Default-Release, the -t
   option or per package with the pkg/release syntax, if possible.

   [snip]

--print-uris
   Instead of fetching the files to install their URIs are printed. Each URI will have
   the path, the destination file name, the size and the expected MD5 hash. Note that the
   file name to write to will not always match the file name on the remote site! This
   also works with the source and update commands. When used with the update command the
   MD5 and size are not included, and it is up to the user to decompress any compressed
   files. Configuration Item: APT::Get::Print-URIs.
1
  • Thanks. Just want to point out, as I shake my fist in the direction of the manpage author, that the quoted section from apt(8) is literally the last paragraph.
    – rgov
    Commented Jun 16, 2023 at 5:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .