Gentoo Archives: gentoo-dev

From: Peter Volkov <pva@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: auto-detection of unpack dependencies
Date: Sun, 20 Jul 2008 13:52:22
Message-Id: 1216561338.4891.101.camel@camobap
In Reply to: Re: [gentoo-dev] RFC: auto-detection of unpack dependencies by Marius Mauch
1 В Чтв, 17/07/2008 в 04:51 +0200, Marius Mauch пишет:
2 > At dev.gentoo.org/~genone/unpack.eclass is the draft for an eclass
3 > to implement this feature.
4
5 Marius, although it's possible to do this things in eclass why is eclass
6 better? As I see portage's unpack() already has extension <-> "program
7 to unpack" relation. Basically unpack() in ebuild.sh has the following
8 code:
9
10 unpack() {
11 [snip]
12 case "${x##*.}" in
13 tar)
14 tar xof "${srcdir}${x}" ${tar_opts} || die "$myfail"
15 ;;
16 tgz)
17 tar xozf "${srcdir}${x}" ${tar_opts} || die "$myfail"
18 [snip and so on...]
19
20 This means that every ebuild which uses 'unpack ${A}' should have in
21 DEPEND a program which is selected by filename extension of sources. So
22 as I understood your initial suggestion was to make this happen
23 automatically. And this is very logical as makes ebuilds cleaner and
24 more terse. So why did you changed your mind and try to write another
25 eclass (which then should sit in the tree forever), to create duplicate
26 unpack function instead of just making step you suggested initially? Is
27 there any intension to remove unpack logic from package manager? And if
28 yes, why?
29
30 --
31 Peter.

Replies