:: Re: [DNG] [Dng] What do you guys th…
Top Pagina
Delete this message
Reply to this message
Auteur: Adam Borowski
Datum:  
Aan: dng
Onderwerp: Re: [DNG] [Dng] What do you guys think about "Suggest" and "Recommends" dependency?
On Mon, Aug 01, 2016 at 01:55:57PM +1200, Daniel Reurich wrote:
> Why are we dragging up a thread from over a year ago??
>
> I strongly disagree, installing "Recommends" are IMHO reasonable for the
> common case, and that should stay the default except where the user
> wants to maintain a really minimal system, and is prepared to have to
> install everything not an explicit hard dependency.


A thousand times this. "Recommends" are meant for _most_ users, not for a
minority who feels an urge to micromanage their systems. And let's say what
the policy says:

# `Recommends'
#     This declares a strong, but not absolute, dependency.
#
#     The `Recommends' field should list packages that would be found
#     together with this one in all but unusual installations.


With this definition at hand, we can see why you're unhappy.

It might be that:
* you're unusual (like, a compulsive desire to remove all perceived bloat)
* your needs are unusual (deeply embedded, etc)
* the Recommends is in error

If it's the last, please file a bug. Either in Devuan, or, preferably in
cases not related to systemd, in Debian.

Usually such bogus Recommends are an obvious fix, but there _is_ a technical
issue that can make this complex: Recommends from libraries. The root of
that problem is, in many languages including C, having a library optional is
non-trivial. The difficulty in doing so can range from a few lines of code
to being impossible within a reasonable amount of effort. Thus, almost no
one bothers to, as a superfluous library is just a negligible amount of
wasted disk space. Unless that library pulls something else, that is.

It's discussed in depth in a previous discussion:
https://lists.debian.org/debian-devel/2016/04/msg00162.html

An example:
(many metapackages)->
[R]: xfce4-power-manager     (GUI for power management)
[D]: upower                  (daemon that does the work)
[D]: libimobiledevice6       (a library for a minor side feature)
[R]: usbmuxd                 (daemon only for iPod owners)


Most of us do want xfce4-power-manager, so [R] is right.
It's just a GUI for the daemon, [D] is right.
Optional library dependency is lots of work, [D] for technical reasons.
The library is useless without its daemon, so... [D] or [R]?

My proposed fix for such cases is to forbid Recommends from libraries and
moving them to their users, so it'd be upower who decides how much it needs
usbmuxd (in this case, not at all).


So, when some Recommends offends you, please point it out.

I've attached a script (in some heathen language) that shows what
unsatisfied Recommends you have on your system. I forgot who's the author
of the script, sorry.


Meow!
--
An imaginary friend squared is a real enemy.
#!/usr/bin/python
import apt
c = apt.Cache()
for pkg in c:
    if pkg.installed is not None:
        for rd in pkg.candidate.get_dependencies("Recommends"):
            if not rd.installed_target_versions:
                print pkg, rd