与此 repoquery 命令等效的 debian 是什么?

与此 repoquery 命令等效的 debian 是什么?

与此 repoquery 命令等效的 debian 是什么?

repoquery --repofrompath="abc,http://path/to/repo" --repoid=abc -q mypkg 
--qf %{NAME}_%{VERSION}_%{RELEASE}_%{ARCH}_%{BUILDTIME}_%{PACKAGER}_%{LOCATION}

这将忽略 /etc/yum.repos.d 下指定的任何存储库,并在 repofrompath 中指定的存储库中列出 mypkg 最新可用版本的请求信息。

到目前为止,我已经找到了

apt-cache showpkg mypkg

但我不确定如何使用 -c config-file 选项来模拟上面 repofrompath 的效果。

答案1

你可以尝试一下 aptitude。例子:

root@printserver:/root# aptitude search --display-format '%p_%V_%m ' --disable-columns  "tcsh"
tcsh_6.17.02-4_Thomas Lange <[email protected]> 

在哪里:

%p = Package Name
%V = Version
%m = Maintainer

示例与--target-release option

root@printserver:~# aptitude search --display-format '%p_%V_%m ' --disable-columns  "linux-image-amd64" --target-release squeeze
linux-image-amd64_2.6.32+29_Debian Kernel Team <[email protected]> 
root@printserver:~# aptitude search --display-format '%p_%V_%m ' --disable-columns  "linux-image-amd64" --target-release squeeze-backports
linux-image-amd64_3.2+46~bpo60+1_Debian Kernel Team <[email protected]> 

相关内容