Ignoring/Blacklisting packages?

I need to use devel/android-tools-adb to update my smartphones to current LineageOS.

This however conflicts with poetteringware (avahi) that gets installed by the KDE metapackage but is not being used by me (the KDE stuff that "depends" on avahi runs fine without it). It complains that "avahi-libdns-0.8 conflicts with mDNSResponder-1310.140.1 on /usr/local/lib/libdns_sd.so".
Using the pkg -f switch It is possible to pkg delete -f avahi-libdns to get rid of the avahi-libdns crap, so pkg does no longer complain about conflicts.

But I didn't find an pkg install option that avoids deleting the KDE metapackage (because avahi-libdns has gone) and does not re-install avahi-libdns.
Any idea how avahi-libdns could be somehow pkg-"blacklisted", making pkg ignore dependencies on it and not install it when checking for dependencies?
 
I'd love to have such a feature in pkg (typically to use against another poetterware called PulseAudio!) but unfortunately it doesn't exist as far as I know.

You can usually solve such a problem by building a few things from ports with custom options.

avahi-libdns is pulled as a dependency by dns/kf5-kdnssd (itself a dependency of various KDE packages). Avahi support is optional:
Code:
===> The following configuration options are available for kf5-kdnssd-5.91.0:
====> Zeroconf (Bonjour) support: you can only select none or one of them
     AVAHI=on: Zeroconf support via Avahi
     MDNSRESPONDER=off: Zeroconf support via mDNSResponder
===> Use 'make config' to modify these settings
You can therefore build kf5-kdnssd locally with Avahi support turned off, and lock that package (otherwise it'll get replaced by the standard package upon the next pkg upgrade). However this means you'll have to rebuild it manually every now and then to keep it up to date, which may not be very convenient for a shared dependency.

If mDNSResponder is not necessary to your use of adb, an other option would be to build adb locally with the corresponding option disabled, which is also available:
Code:
===> The following configuration options are available for android-tools-adb-29.0.6_1:
     BASH=off: Install programmable completions for Bash
     DOCS=on: Build and/or install documentation
     MDNSRESPONDER=on: Zeroconf support via mDNSResponder
     TEST=off: Build and/or run tests
     TEST_PYTHON=off: Build and/or run python tests
===> Use 'make config' to modify these settings
You'll of course also need to lock it and rebuild it for upgrades, but this isn't much of a concern for a "leaf" package.

See my post here for the exhaustive procedure I follow.
 
Back
Top