Re: Script to get all deps of a package (for soname bumps etc.)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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_verbose.sh
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

Attachment: signature.asc
Description: PGP signature

_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux