Gentoo Archives: gentoo-dev

From: Marius Mauch <genone@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: auto-detection of unpack dependencies
Date: Thu, 17 Jul 2008 17:07:32
Message-Id: 20080717190613.920d2302.genone@gentoo.org
In Reply to: Re: [gentoo-dev] RFC: auto-detection of unpack dependencies by Joe Peterson
1 On Thu, 17 Jul 2008 07:00:32 -0500
2 Joe Peterson <lavajoe@g.o> wrote:
3
4 > Marius Mauch wrote:
5 > > The eclass also contains it's own implementation of unpack (renamed
6 > > to unpack2) and src_unpack so the logic which tools/packages are
7 > > used for unpacking can be maintained in a single place instead of
8 > > being splitted between the package manager and the tree.
9 >
10 > Marius, these look like nice functions. A couple of questions:
11 >
12 > 1) Since it requires altering an ebuild to use these features (i.e. no
13 > automatic), what is the advantage over just including the dep the
14 > usual way?
15
16 You wouldn't have to maintain the relevant deps, e.g. when you change
17 SRC_URI, when the unpack implementation changes (e.g. adding support
18 for new unpackers) or keeping the conditionals in sync with SRC_URI.
19
20 > 2) The name "unpack2" is intended to be temporary, right? ;) I'd
21 > guess that after this functionality is integrated into portage, there
22 > would be no need for the extra unpack func. But then we'd probably
23 > have to keep "unpack2" for a long time as an alias. Any way to avoid
24 > that?
25
26 Well, it can't be named unpack to avoid conflicts with the internal
27 portage function. If this functionality would be added on the PM side
28 then there would be no more need for the eclass (you wouldn't want to
29 use both implementations at the same time), and it would be opt-in via a
30 new EAPI, so you'd have to change the ebuilds anyway to benefit from
31 it. So I don't see a need to have a unpack2 alias outside the eclass.
32
33 > 3) Same would go for the needed call for unpack_update_depend,
34 > correct? I.e. it would not be needed after portage has this
35 > functionality (and at that point, the unpack and dep code would be
36 > unified cleanly). So this function would then become a stub,
37 > correct? The only thing here is that ebuilds could linger for some
38 > time without being "cleaned up".
39
40 See above.
41
42 Marius
43 --
44 gentoo-dev@l.g.o mailing list