Gentoo Archives: gentoo-portage-dev

From: Brian Harring <ferringb@×××××.com>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [RFC] Mask packages that don't cross-compile
Date: Thu, 23 Nov 2006 02:17:11
Message-Id: 20061123021625.GA7475@seldon
In Reply to: Re: [gentoo-portage-dev] [RFC] Mask packages that don't cross-compile by Daniel Barkalow
1 On Wed, Nov 22, 2006 at 07:27:42PM -0500, Daniel Barkalow wrote:
2 > On Wed, 22 Nov 2006, Brian Harring wrote:
3 > I'm not inserting cross into a package's keywords. I'm saying that perl
4 > ebuilds (for example) should have in their KEYWORDS "-cross" to indicate
5 > that they don't work with the "cross" keyword. The logic is the completely
6 > universal thing where a package puts its keywords in KEYWORDS, and the
7 > configuration has keywords in make.conf. The proper place for an ebuild to
8 > specify that it doesn't work when cross-compiling is, obviously, in the
9 > ebuild, since the maintainers obviously know, or can be told.
10 >
11 > With mainline emerge (and a locally-modified perl ebuild that adds
12 > "-cross" to KEYWORDS) and ACCEPT_KEYWORDS="cross", I get:
13 >
14 > mygroups = "alpha amd64 arm hppa ia64 m68k mips ppc ~ppc-macos ppc64 s390
15 > sh sparc ~sparc-fbsd x86 ~x86-fbsd -cross"
16 > pgroups = "arm cross"
17
18 Stand corrected, although would probably take an act of god for me to
19 consider KEYWORDS='* -x86' being matched by ACCEPT_KEYWORDS=x86
20 anything but an oddity of the implementation ;)
21
22
23 > > > The present documentation (Ebuild HOWTO, for example) says "If the
24 > > > KEYWORDS flag has a preceding -, then the package does not work with the
25 > > > given keyword." But this is ignored by portage, because "Packages that do
26 > > > not support the native architecture are automatically masked by Portage",
27 > > > which means that "-x86" has no effect, because an ebuild with "-x86" won't
28 > > > have "x86" or "~x86", and is therefore masked. I'm proposing that "-foo"
29 > > > be taken seriously as meaning that the package does not work with the
30 > > > "foo" keyword, even if the ebuild would otherwise be visible.
31 > >
32 > > Why would you propose that? That's already the case as is, folks just
33 > > have a way around it if they try hard enough (which isn't necessarily
34 > > a bad thing).
35 >
36 > That is not the case currently. If a package has "-foo" (when the user has
37 > "foo" and doesn't have "-foo"), the ebuild still can pass the keyword
38 > check. E.g., if an ebuild has KEYWORDS="* -x86", it will be built on x86.
39
40 Statement above is still the case; for '*', that's a *very* odd case,
41 one that's not relevant either- no ebuild has '*' for a keyword token,
42 and any dev commiting such an attrocity would likely be flogged
43 publically.
44
45
46 > In the example above, the package is not masked under the current
47 > implementation, because "arm" matches and "-cross" is completely ignored.
48
49 As stated, '*' is never used, and *will* never be used; there isn't
50 any justification for it nor previous usage of it in the 3+ years or
51 so I've been around (and annoying folk).
52
53
54 > > Not seeing how that proposal is related to xcompile either.
55 >
56 > It's not specificly connected to xcompile. It just lets ebuilds specify
57 > negative keywords that have actual effects.
58
59 Offhand, why should keywords be _able_ to be negative? KEYWORDS is
60 just a list of elements that keywords visibility must match, treated
61 (now even) as just positives/assertions for arches; -arch in KEYWORDS
62 is currently just storing intent/notes (effectively) in KEYWORDS, the
63 fact folks can match against it is an oddity from package.keywords, a
64 sideaffect of disabling incrementals for package.keywords so that
65 people could get at -* keyworded ebuilds;
66
67 -* already is flagged as bad in an ebuild; iow, it's likely to die
68 off... so why expand it?
69
70 Additional question is if -arch isn't related to xcompile, why
71 should the change be made if nothing needs it? :)
72
73
74 > It's just that "I'm
75 > cross-compiling" is a property that isn't tied to a particular profile and
76 > which a number of ebuilds could use to say "this ebuild won't work for
77 > you".
78
79 So why abuse keywords for it, when restrict exists? Keywords has a
80 specific purpose now, it's not used to store bools for random
81 capabilities (one could argue that archs are just that, but that's a
82 bit of a reach).
83
84 That said, RESTRICT *is* used to store random bools for capabilities;
85 why do you think keywords should be adjusted in scope when RESTRICT
86 has historically served as a dumping ground for bits like this?
87
88 ~harring

Replies