Re: The 'rpm -q --whatrequires' variant to get list of all dependant packages?
On 11/10/2016 02:08 AM, Pavel Raiskup wrote: > On Wednesday, November 2, 2016 5:51:51 PM CET Pavel Raiskup wrote: >> Consider we have package 'foo-libs' that provides set of libraries. >> >> How do I get all dependant packages (for batch rebuild of dependencies after >> package update)? Something which takes soft dependencies into account, too. >> >> Some packages might depend on 'foo-libs' explicitly, some depend on soname >> (implicitly), some depend on particular file within package (say >> /usr/libexec/libfoohelper). >> >> Is there facility within 'dnf repoquery' that gives ultimate answer? I can >> do >> sub-queries later do pick the important rebuild candidates. >> >> Also, I would be curious about "ultimate" repoquery to get list of SOURCE >> dependants, e.g. on 'foo-devel'. > > Is there something similar to 'dnf repoquery --whatrequires foo-libs > --all-deps' > in RPM? See the following: > > $ rpm -q --whatrequires libarchive > no package requires libarchive > $ sudo dnf remove libarchive > Dependencies resolved. > Error: The operation would result in removing the following protected > packages: dnf. As it happens, as part of our Base Runtime efforts, I've written a tool to do exactly that (requires DNF 2.0): dnf update python3-dnf --enablerepo=rawhide git clone https://github.com/sgallagher/whatpkgs/ cd whatpkgs ./whatpkgs.py neededby [--recommends] foo-libs (Note: you will probably want to add --hint=glibc-minimal-langpack, --hint=coreutils and --hint=generic-release[1] to resolve common cases where more than one package might satisfy a dependency.) [1] There was a bug in fedora-release in F25 until recently which caused it to pull in bash and bash's deps. generic-release did not have that bug and is otherwise identical for this purpose. signature.asc Description: OpenPGP digital signature ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Re: The 'rpm -q --whatrequires' variant to get list of all dependant packages?
On Thursday, November 10, 2016 11:46:16 AM CET Pádraig Brady wrote: > On 10/11/16 07:08, Pavel Raiskup wrote: > > Is there something similar to 'dnf repoquery --whatrequires foo-libs > > --all-deps' > > in RPM? See the following: > > > > $ rpm -q --whatrequires libarchive > > no package requires libarchive > > $ sudo dnf remove libarchive > > Dependencies resolved. > > Error: The operation would result in removing the following protected > > packages: dnf. > > You can do that with `rpm -e --test`. > I've a wrapper script for deb and rpm at: > http://www.pixelbeat.org/scripts/whatrequires Thanks to everybody for suggestions; yes those are commands I need. There's now also rhbz#1393704 to have it implemented in RPM. Pavel ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Re: The 'rpm -q --whatrequires' variant to get list of all dependant packages?
On 10/11/16 07:08, Pavel Raiskup wrote: > Is there something similar to 'dnf repoquery --whatrequires foo-libs > --all-deps' > in RPM? See the following: > > $ rpm -q --whatrequires libarchive > no package requires libarchive > $ sudo dnf remove libarchive > Dependencies resolved. > Error: The operation would result in removing the following protected > packages: dnf. You can do that with `rpm -e --test`. I've a wrapper script for deb and rpm at: http://www.pixelbeat.org/scripts/whatrequires ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Re: The 'rpm -q --whatrequires' variant to get list of all dependant packages?
> $ rpm -q --whatrequires libarchive > no package requires libarchive This does the trick for me: rpm -q --whatrequires $(rpm -q --provides libarchive | awk '{print $1}') Dridi ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Re: The 'rpm -q --whatrequires' variant to get list of all dependant packages?
On Qui, 2016-11-10 at 08:08 +0100, Pavel Raiskup wrote: > On Wednesday, November 2, 2016 5:51:51 PM CET Pavel Raiskup wrote: > > > > Consider we have package 'foo-libs' that provides set of libraries. > > > > How do I get all dependant packages (for batch rebuild of > > dependencies after > > package update)? Something which takes soft dependencies into > > account, too. > > > > Some packages might depend on 'foo-libs' explicitly, some depend on > > soname > > (implicitly), some depend on particular file within package (say > > /usr/libexec/libfoohelper). > > > > Is there facility within 'dnf repoquery' that gives ultimate > > answer? I can do > > sub-queries later do pick the important rebuild candidates. > > > > Also, I would be curious about "ultimate" repoquery to get list of > > SOURCE > > dependants, e.g. on 'foo-devel'. > Is there something similar to 'dnf repoquery --whatrequires foo-libs > --all-deps' > in RPM? See the following: > > $ rpm -q --whatrequires libarchive > no package requires libarchive > $ sudo dnf remove libarchive > Dependencies resolved. > Error: The operation would result in removing the following > protected packages: dnf. I don't think so in dnf repoquery you may use --installed to query just installed packages. dnf repoquery --whatrequires libarchive --alldeps --installed with rpm you may query requires of all packages rpm -qa --requires | grep libarchive and with a few commands you can get the result . > Thanks, > Pavel > ___ > devel mailing list -- devel@lists.fedoraproject.org > To unsubscribe send an email to devel-le...@lists.fedoraproject.org -- Sérgio M. B. ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org
The 'rpm -q --whatrequires' variant to get list of all dependant packages?
On Wednesday, November 2, 2016 5:51:51 PM CET Pavel Raiskup wrote: > Consider we have package 'foo-libs' that provides set of libraries. > > How do I get all dependant packages (for batch rebuild of dependencies after > package update)? Something which takes soft dependencies into account, too. > > Some packages might depend on 'foo-libs' explicitly, some depend on soname > (implicitly), some depend on particular file within package (say > /usr/libexec/libfoohelper). > > Is there facility within 'dnf repoquery' that gives ultimate answer? I can do > sub-queries later do pick the important rebuild candidates. > > Also, I would be curious about "ultimate" repoquery to get list of SOURCE > dependants, e.g. on 'foo-devel'. Is there something similar to 'dnf repoquery --whatrequires foo-libs --all-deps' in RPM? See the following: $ rpm -q --whatrequires libarchive no package requires libarchive $ sudo dnf remove libarchive Dependencies resolved. Error: The operation would result in removing the following protected packages: dnf. Thanks, Pavel ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org