Gentoo Archives: gentoo-dev

From: Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: optinal run time dependencies
Date: Tue, 28 Jun 2011 11:06:50
Message-Id: 20110628120328.01ae21e2@googlemail.com
In Reply to: [gentoo-dev] RFC: optinal run time dependencies by Peter Volkov
1 On Tue, 28 Jun 2011 14:38:19 +0400
2 Peter Volkov <pva@g.o> wrote:
3 > Hi guys. We've had discussion on optional runtime dependencies in bug
4 > 361255, but I think it's worth to have broader discussion of this
5 > issue.
6
7 Have you seen how Exherbo solved the same problem? exheres-0 has
8 'suggested' and 'recommended' dependencies, which are variations on
9 post dependencies. Suggested dependencies are displayed (along with a
10 description explaining what they do for the packages suggesting them)
11 but not taken by default, and recommended dependencies are taken (but
12 shown as just being recommended) unless the user says not to.
13
14 To avoid annoyance, there are two special cases. First, if a suggested
15 or recommended dependency is already installed, then it's treated like a
16 regular post dependency for upgrades etc (so you don't have to take
17 suggestions every single time). Second, there's a config file allowing
18 users to permanently 'untake' or 'take things.
19
20 So let's take an oversimplified 'git':
21
22 DEPENDENCIES="
23 suggestion:
24 dev-perl/TermReadKey [[
25 description = [ Dependency for 'git add --interactive' ]
26 ]]
27
28 (
29 dev-perl/Authen-SASL
30 dev-perl/Net-SMTP-SSL
31 ) [[
32 *description = [ Dependency for 'git send-email' ]
33 *group-name = [ git-send-email ]
34 ]]
35 "
36
37 Here, when a user first tries to install 'git', they get something like
38 this (output abbreviated for clarity):
39
40 n dev-scm/git:0::arbor 1.7.5.4 to ::installed
41 bash-completion curl -doc -emacs -ipv6 python
42
43 I did not take the following:
44
45 (n) dev-perl/TermReadKey:0::arbor 2.30 to ::installed
46 "Change terminal modes, and perform non-blocking reads"
47 Reasons: dev-scm/git (sug): "Dependency for 'git add --interactive'"
48 Take using: --take
49
50 (n) dev-perl/Authen-SASL:0::arbor 2.15 to ::installed
51 "Perl SASL Authentication framework"
52 Reasons: dev-scm/git (sug): "Dependency for 'git send-email'"
53 Take using: --take (git-send-email)
54
55 (n) dev-perl/Net-SMTP-SSL:0::arbor 1.01 to ::installed
56 "SSL support for Net::SMTP"
57 Reasons: dev-scm/git (sug): "Dependency for 'git send-email'"
58 Take using: --take (git-send-email)
59
60 Here, the user can just go ahead and install 'git' if they like --
61 untaken dependencies are just informational, not an error. Or they can
62 do some of the following:
63
64 * They can '--take TermReadKey' etc. Or they can use the 'group name',
65 like '--take git-send-email', since suggested dependencies often come
66 in groups and it's handy that way.
67
68 * Similarly, they can '--take-from git'. There's also '--ignore' and
69 '--ignore-from'. They're not widely used in practice.
70
71 * They can update the 'suggestions.conf' file to record their choice.
72 But this isn't usually necessary, because of the "if a suggestion is
73 already installed, automatically take it" behaviour. It's mostly used
74 to say "I've seen this suggestion, and don't want it, so don't show
75 it to me again". Still, it's handy for suggestion groups if, say, git
76 send-email's optional extra dependencies keep changing.
77
78 Seems to work rather well in practice...
79
80 --
81 Ciaran McCreesh

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] RFC: optinal run time dependencies "Michał Górny" <mgorny@g.o>