Skip to content

Instantly share code, notes, and snippets.

@pvalena
Last active December 23, 2020 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pvalena/76560097815fe6544c9bc4905e6bf7a1 to your computer and use it in GitHub Desktop.
Save pvalena/76560097815fe6544c9bc4905e6bf7a1 to your computer and use it in GitHub Desktop.
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