我有这样的输出cat /etc/apt/sources.list
:
cat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu jammy main universe multiverse restricted
deb-src http://archive.ubuntu.com/ubuntu jammy main universe multiverse restricted
deb http://archive.ubuntu.com/ubuntu jammy-security main universe multiverse restricted
deb-src http://archive.ubuntu.com/ubuntu jammy-security main universe multiverse restricted
deb http://archive.ubuntu.com/ubuntu jammy-updates main universe multiverse restricted
deb-src http://archive.ubuntu.com/ubuntu jammy-updates main universe multiverse restricted
deb http://archive.ubuntu.com/ubuntu jammy-proposed main universe multiverse restricted
deb-src http://archive.ubuntu.com/ubuntu jammy-proposed main universe multiverse restricted
deb http://archive.ubuntu.com/ubuntu jammy-backports main universe multiverse restricted
deb-src http://archive.ubuntu.com/ubuntu jammy-backports main universe multiverse restricted
如果我这样做:
sudo apt-get --option 'Dir::Cache="/tmp/nothingthere"' --print-uris install --reinstall qemu-system-gui/jammy-proposed 2>&1 | grep http | grep qemu-system-x86
'http://archive.ubuntu.com/ubuntu/pool/main/q/qemu/qemu-system-x86_6.2%2bdfsg-2ubuntu6.8_amd64.deb' qemu-system-x86_1%3a6.2+dfsg-2ubuntu6.8_amd64.deb 10086894 MD5Sum:cec14bb2b5e45450b98c2b4708817fe9
但使用我没有得到 6.7jammy-updates
的地方:jammy-proposed
https://packages.ubuntu.com/search?keywords=qemu-system-gui
这是一个错误吗?如果不是,是否有一种简单的方法可以在不更改 sources.list 的情况下获取“更新”?
目的是了解来自“分布”-“流”的文件,以提供列表来比较我们产品的 CVE、错误、测试和交付风险,从而做出决策选择。
答案1
抱歉,但使用| grep package-name
向我们隐藏了某些依赖关系未得到满足的事实,因此 apt 不会向我们输出无文件路径。
我们找到了其他方法来完成我们想要做的事情,在循环顶部逐步改变 sources.list,顺序如下:
“distrib”, “
distrib”-security ,“
distrib”-updates,
“distrib”-proposed。