On Mon, Jul 18, 2022 06:52:26 -0500, Richard Shaw wrote:
<snip>
Hi Richard,
Thanks very much for sharing your script.
I use this script which I'm pretty sure I pieced together from
some of Sergio's
logic some time ago. I like that it saves them to a file so I can iterate over
them with other scripts.
$ cat ~/.local/bin/needs_rebuilding
#!/bin/bash
if [ $# -eq 0 ]
then
echo "No arguments supplied"
echo "Usage: $0 <pkgname> [pkgname] ..."
exit 0
fi
provides=$(mktemp -t provides-XXXXXX)
deps=$(mktemp -t rawdeps-XXXXXX)
# Only break on newline not space or tab in for loops
IFS=$'\n'
for pkg in "$@"; do
echo "Checking for provides in $pkg."
dnf --quiet repoquery --repoid=rawhide --provides "$pkg" >> $provides
done
sed -i "/^bundled/d" $provides
sort -u -o $provides $provides
echo "Found $(wc -l $provides | awk '{print $1}') provides to be
evaluated."
^
I think this bit isn't required because as Maxwell confirmed, repoquery
is smart enough to take all provides into account. However, if one does
want to see what capability causes the dependency, I think we must go
over each capability individually.
So, after the discussion here, I've shamelessly picked bits from all
your responses and scripts and have come up with these two:
https://pagure.io/fedora-get-package-dependencies/blob/main/f/get_deps.sh
gives just a list of all deps, without going over each capability
individually
https://pagure.io/fedora-get-package-dependencies/blob/main/f/get_deps_ve...
gives a more verbose report listing what capability of the package other
packages are dependent on.
If folks can please test these out and make more improvements, I can
open a PR in the package-maintainer docs to list these there to give
them more visibility.
--
Thanks,
Regards,
Ankur Sinha "FranciscoD" (He / Him / His) |
https://fedoraproject.org/wiki/User:Ankursinha
Time zone: Europe/London