bash 如何递归下载 RPM 依赖项?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17783941/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to recursivly download RPM dependencies?
提问by Malki
I want to write a mini script that downloads all the recursive dependencies of an RPM package in Linux RedHat.
我想编写一个迷你脚本,下载 Linux RedHat 中 RPM 包的所有递归依赖项。
When I use:
当我使用:
repoquery -a --requires --recursive --resolve PACKAGE_NAME
I'm not getting all the recursive dependencies, but when I use:
我没有得到所有的递归依赖,但是当我使用:
repoquery -a --tree-requires PACKAGE_NAME
I'm getting all the dependencies but I'm not getting a usable list that I can pipeline into yumdownloader
.
我获得了所有依赖项,但没有获得可以通过管道传输到yumdownloader
.
What should I do?
我该怎么办?
回答by user3113626
回答by Adam Kurkiewicz
If you're from the future like me (Fedora 23+), where yum is getting replaced with dnf, and repotracker is no longer working, you might find this bash scriptuseful.
如果你像我一样来自未来(Fedora 23+),yum 被 dnf 取代,并且 repotracker 不再工作,你可能会发现这个 bash 脚本很有用。