在我的 /etc/apt/sources.list.d/ 中,我有以下几行:
deb http://download.opensuse.org/repositories/shells:/fish:/release:/3/Debian_9.0/ /
deb http://repo.percona.com/percona/apt stretch main
deb-src http://repo.percona.com/percona/apt stretch main
我不知道如何为这些额外的来源命名。原始存储库的名称类似于“oldstable”,但如何为其添加自定义名称?它被列为“未知”...
如果我输入apt list -a percona-server-server fish
,我会得到这些:
fish/stretch-backports,now 3.0.2-2~bpo9+1 amd64 [installed]
fish/unknown 3.0.2-1 amd64
fish/oldstable 2.4.0-1 amd64
percona-server-server/unknown 5.6.45-86.1-1.stretch amd64
答案1
我认为这是不可能的。
输出中的标识符apt list
源自套房元数据信息位于存储库的Release
或 InRelease
文件中,无法在本地覆盖。
$ curl -s -L https://deb.debian.org/debian/dists/stretch/Release | grep "^Suite:"
Suite: oldstable
$ curl -s -L https://deb.debian.org/debian/dists/stretch-backports/Release | grep "^Suite:"
Suite: stretch-backports
您的两个存储库都没有在其文件中设置该字段,Release
这就是 apt 默认为unknown
.
$ curl -s -L https://repo.percona.com/percona/apt/dists/stretch/Release | grep "^Suite:"
$ curl -s -L https://download.opensuse.org/repositories/shells:/fish:/release:/3/Debian_9.0/Release | grep "^Suite:"
$