7

Is there an easy way to determine where a specific yum group is sourced?

I can query what groups are available using yum grouplist.
I can query group information using yum group info $yum_group_name

What's troubling me is I can't determine which repository a group is being sourced from.

The best I've done is find what repositories hold the group:

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

Say a group exists in multiple repositories, how do I know which one is used?

2
  • You would like to know what repositories used for installing packages by groupinstall? Jan 6, 2018 at 22:38
  • That would be a separate question. I'd be interested in learning that as well but it is currently not the primary interest here. I want to know which repository is providing the comps.xml data (namely-- if parsing repomd.xml, the 'group' data).
    – jgrump2012
    Jan 8, 2018 at 0:20

2 Answers 2

0

Not sure if there is an option to print group list and the corresponding source repository. Using -v option with groupinfo lists the source repository for packages from the given group.

# yum groupinfo <grp_name> -v 

or

# yum groups info <grp_name> -v # on RHEL 7
Group: Security Tools
Group-Id: security-tools
rpmdb time: 0.000
Description: Security tools for integrity and trust verification.
Default Packages:
  +scap-security-guide-0.1.33-6.el7_4.noarch    rhel-7-server-rpms
Optional Packages:
  aide-0.15.1-13.el7.x86_64                     rhel-7-server-rpms
0

I think groups a defined in the metadata of the "base" repo. At least that's what I see in CentOS. They aren't "in" any repo like a package is; rather they're part of the structure of the repo. Here's the only place I see them defined in the CentOS-* repos.

http://mirror.centos.org/centos/7/os/x86_64/repodata/*.comps.xml

I see another *comps.xml in ELREPO's repodata dir. I think maybe its groups are merged with ones existing in Centos-base and if there aren't existing groups yet, we'll see new groups available.

So, the effect would be that the "base" group gets a few more packages when elrepo is enabled. And there are few new groups.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.