“apt source” 的文档在哪里?

“apt source” 的文档在哪里?

现场文档在哪里apt source

  1. apt source --help不打印任何使用信息,也没有提及source子命令。

  2. 手册页apt(8)没有提到source子命令的存在。它给出了一个借口,并让我们想知道它试图避免重复什么文档:

    与 apt 本身非常相似,它的手册页旨在作为最终用户界面,因此只提到最常用的命令和选项,部分是为了不在多个地方重复信息,部分是为了避免让读者被大量的选项和细节所淹没。

    确实,我绝对没有感到不知所措。

  3. 手册页的“另请参阅”部分将我们引导至APT 用户指南这可能比手册页说的还少。

  4. 它还引导我们APT 指南上面标着过时的但它至少描述apt-get source,相关命令大概有相同的行为。

  5. 最后还有源代码这实际上不算是文档,但告诉我们哪些配置选项。哦,嘿,有一个--print-uris命令行标志。

答案1

它存在于apt-get(8)手册页中。来自的手册页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.

因此,如果某些子命令未在手册页中明确列出,则需要使用apt-get和的手册页apt-cache,因此这非常明确地试图避免重复记录这些命令。

来自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.

相关内容