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.
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx