小编jgr*_*012的帖子

yum 组来自哪个存储库?

是否有一种简单的方法可以确定特定 yum 组的来源?

我可以使用yum grouplist.
我可以使用查询组信息yum group info $yum_group_name

困扰我的是我无法确定一个组来自哪个存储库。

我所做的最好的事情是找到保存该组的存储库:

yum_group_name="....."  # or ID 
# find all repository identifiers
# perform yum commands with only 1 repository enabled
cat /etc/yum.repos.d/*  | grep '\[.*\]' | grep -v '#' | tr -d '[]' | xargs -I {} -t sh -c "yum --disablerepo='*' --enablerepo='{}' group info $yum_group_name 2>&1 | grep 'Group:'"
# subsequently, associate a bareurl to repository identifier
Run Code Online (Sandbox Code Playgroud)

假设一个组存在于多个存储库中,我怎么知道使用了哪个?

linux yum rhel7

7
推荐指数
1
解决办法
652
查看次数

标签 统计

linux ×1

rhel7 ×1

yum ×1