public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* Re: [gentoo-dev] RFC: optinal run time dependencies
  @ 2011-06-28 11:03 99% ` Ciaran McCreesh
  0 siblings, 0 replies; 1+ results
From: Ciaran McCreesh @ 2011-06-28 11:03 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 3237 bytes --]

On Tue, 28 Jun 2011 14:38:19 +0400
Peter Volkov <pva@gentoo.org> wrote:
> Hi guys. We've had discussion on optional runtime dependencies in bug
> 361255, but I think it's worth to have broader discussion of this
> issue.

Have you seen how Exherbo solved the same problem? exheres-0 has
'suggested' and 'recommended' dependencies, which are variations on
post dependencies. Suggested dependencies are displayed (along with a
description explaining what they do for the packages suggesting them)
but not taken by default, and recommended dependencies are taken (but
shown as just being recommended) unless the user says not to.

To avoid annoyance, there are two special cases. First, if a suggested
or recommended dependency is already installed, then it's treated like a
regular post dependency for upgrades etc (so you don't have to take
suggestions every single time). Second, there's a config file allowing
users to permanently 'untake' or 'take things.

So let's take an oversimplified 'git':

DEPENDENCIES="
    suggestion:
        dev-perl/TermReadKey [[
            description = [ Dependency for 'git add --interactive' ]
        ]]

        (
            dev-perl/Authen-SASL
            dev-perl/Net-SMTP-SSL
        ) [[
            *description = [ Dependency for 'git send-email' ]
            *group-name = [ git-send-email ]
        ]]
    "

Here, when a user first tries to install 'git', they get something like
this (output abbreviated for clarity):

n   dev-scm/git:0::arbor 1.7.5.4 to ::installed
    bash-completion curl -doc -emacs -ipv6 python

I did not take the following:

(n) dev-perl/TermReadKey:0::arbor 2.30 to ::installed
    "Change terminal modes, and perform non-blocking reads"
    Reasons: dev-scm/git (sug): "Dependency for 'git add --interactive'"
    Take using: --take

(n) dev-perl/Authen-SASL:0::arbor 2.15 to ::installed
    "Perl SASL Authentication framework"
    Reasons: dev-scm/git (sug): "Dependency for 'git send-email'"
    Take using: --take (git-send-email)

(n) dev-perl/Net-SMTP-SSL:0::arbor 1.01 to ::installed
    "SSL support for Net::SMTP"
    Reasons: dev-scm/git (sug): "Dependency for 'git send-email'"
    Take using: --take (git-send-email)

Here, the user can just go ahead and install 'git' if they like --
untaken dependencies are just informational, not an error. Or they can
do some of the following:

* They can '--take TermReadKey' etc. Or they can use the 'group name',
  like '--take git-send-email', since suggested dependencies often come
  in groups and it's handy that way.

* Similarly, they can '--take-from git'. There's also '--ignore' and
  '--ignore-from'. They're not widely used in practice.

* They can update the 'suggestions.conf' file to record their choice.
  But this isn't usually necessary, because of the "if a suggestion is
  already installed, automatically take it" behaviour. It's mostly used
  to say "I've seen this suggestion, and don't want it, so don't show
  it to me again". Still, it's handy for suggestion groups if, say, git
  send-email's optional extra dependencies keep changing.

Seems to work rather well in practice...

-- 
Ciaran McCreesh

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2011-06-28 10:38     [gentoo-dev] RFC: optinal run time dependencies Peter Volkov
2011-06-28 11:03 99% ` Ciaran McCreesh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox