Skip to content

Instantly share code, notes, and snippets.

@pvalena
Last active Dec 23, 2020
Embed
What would you like to do?
run like: `./list-deps.sh ruby-devel`
#!/usr/bin/bash
set -e
bash -n "$0"
xdnf="dnf -q repoquery '--disablerepo=*' --enablerepo=rawhide --enablerepo=rawhide-source --enablerepo='copr:copr.fedorainfracloud.org:pvalena:ruby-testing' --enablerepo='copr:copr.fedorainfracloud.org:pvalena:rubygems-testing' --latest-limit=1"
fail="{ echo '{}' >> `readlink -f failed.txt`; exit 1; }"
while [[ -n "$1" ]]; do
p="$1"
shift ||:
bash -c " set -x; { $xdnf --qf '%{name}' --whatrequires '$p' --arch=src; } | grep '^rubygem\-' | sort -u | xargs $xdnf --qf '%{source_name}' | grep -v '^(none)' | sort -u | grep '^rubygem\-'"
done
@pvalena
Copy link
Author

pvalena commented Dec 23, 2020

You need the testing copr repos on your system (can be disabled).

$ sudo dnf copr enable pvalena/rubygems-testing
$ sudo dnf copr enable pvalena/ruby-testing

Alternatively, you can remove --enablerepo='copr:...', but you'll get slightly different result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment