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?

  • You would like to know what repositories used for installing packages by groupinstall? – Alexander Tolkachev Jan 6 '18 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 '18 at 0:20

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 


# 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

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.