linux - Debian sources.list.d 与 sources.list

标签 linux repository

一个简单的问题,我在谷歌上搜索时还没有找到解释。与 sources.list 相对的 sources.list.d 是什么? d 代表什么?

(我知道 sources.list 包含指向 debian 可以下载软件的存储库的链接)。

最佳答案

虽然谷歌可以找到大量信息,但您不需要谷歌。手册页提到了它:

man sources.list

SOURCES.LIST.D

The /etc/apt/sources.list.d directory provides a way to add sources.list entries in separate files. The format is the same as for the regular sources.list file. File names need to end with .list and may only contain letters (a-z and A-Z), digits (0-9), underscore (_), hyphen (-) and period (.) characters. Otherwise APT will print a notice that it has ignored a file if the file doesn't match a pattern in the Dir::Ignore-Files-Silently configuration list - in this case it will be silently ignored.

这意味着该目录中的所有文件都与主源列表“合并”在一起,并一起构建存储库集合。

虽然您仍然可以将所有存储库放入一个文件中,但如果将列表分散到多个文件中,则在可维护性方面会有优势。当你想禁用一个存储库时,你可以只删除一个文件而不是操作主列表。这对自动化特别有用。

关于linux - Debian sources.list.d 与 sources.list,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22968952/

相关文章:

c++ - log4cpp(Linux): can't write message into logfile

c# - 使用 Entity Framework Code First 4.3 创建存储库

python - GAE - 包括外部 python 模块而不将它们添加到存储库?

java - 现在有什么工具可以改进、自动化和简化构建和版本控制软件

c - 在应用程序中禁用 Linux 内存过度使用

linux - 用于迭代目录并创建 tar 文件的 bash 脚本

linux - Sudo profile.d 中的 bash 脚本

git - 使用提交的 Git 子模块时有哪些选项?

android - 如何在使用 Android 代码时使用 git 和 repo 工具创建分支

c++ - GCC 构建问题 (#include_next limits.h)