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: Wed, 22 Nov 2006 19:10:49
Message-Id: 20061122190930.GA25620@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 01:45:34PM -0500, Daniel Barkalow wrote:
2 > On Wed, 22 Nov 2006, Marius Mauch wrote:
3 >
4 > > No. -foo is reserved for incremental negation. Maybe that isn't widely
5 > > used in ACCEPT_KEYWORDS, but it has valid uses there and there can't be
6 > > repurposed.
7 >
8 > Oh, so -foo in package.keywords is used to override foo in
9 > ACCEPT_KEYWORDS?
10
11 Incremental negation; "x86 -x86" === ""
12
13 Haven't tried, but would suspect --x86 would come through as -x86
14 (which annoyingly, is a valid keyword).
15
16 > That makes sense, although I'm not entirely convinced
17 > that the logic currently in there actually works. I think the actually
18 > effect seems to be that it lets you try to build a known-broken (for
19 > your arch) ebuild, even in the current trunk.
20
21 That's what -arch in package.keywords accomplishes actually.
22
23 > Both meanings make some
24 > sense, and I'm not clear why people would want to do either; I was just
25 > trying to be consistant with current behaviour.
26
27 > I think it's a legacy
28 > from using "-*" in packages to mask them, and "-*" in package.keywords to
29 > unmask packages masked this way.
30
31 The differing behaviour isn't legacy from package.mask; it's due to
32 certain bad monkeys using -arch in KEYWORDS (a list of arches,
33 *positive*, not negations) to overload it and indicate "this pkg will
34 never work on arch foo".
35
36 And... just to make it a bigger mess, -* can (and is) jammed into
37 keywords despite a repoman check bitching about it. Folks use the
38 tricks above as a 3rd level of visibility filtering (4th if you count
39 accept_license); to use a pkg that has -*, have to stick -* in
40 package.keywords to get at it, same for -arch.
41
42 Which... is bloody annoying. ACCEPT_KEYWORDS is incremental,
43 package.keywords isn't so that folks can get around the overloading
44 people have done to pull off a 3rd level of visibility filtering.
45
46 What is annoying there is that since package.keywords is under
47 *very* weird rules, you can't do the usual incremental tricks there.
48
49 Try specifying that you want to run only stable arch via
50 package.keywords sometime; it's not possible.
51
52
53 > > Is there a particular reason why you don't use the normal
54 > > keyword logic (KEYWORDS=cross and setting -cross in p.keywords to mask a
55 > > package), or simply a package.mask entry?
56 >
57 > I don't want to use a package.mask entry because then you'd need a profile
58 > for cross-compiling every current profile, and these would all have the
59 > same set of changes to the underlying profiles: mask packages that try to
60 > run the programs they build.
61 >
62 > I don't want to use ACCEPT_KEYWORDS=cross, because then I don't get only
63 > packages that are stable for my target architecture, and I want to use the
64 > normal package keyword information as to what versions are good for what
65 > architectures.
66 >
67 > Using ACCEPT_KEYWORDS="cross arm" (which might be what you're suggesting;
68 > portage would automatically insert "arm" if that's my target ARCH, so
69 > ACCEPT_KEYWORDS="cross" actually means ACCEPT_KEYWORDS="cross $ARCH")
70 > would be great, but that gives packages which have "arm" or "cross" (or
71 > "~arm" if I have that in package.keywords), when I want packages that have
72 > "arm" (or "cross", but they shouldn't) and don't have "-arm" (doesn't
73 > matter) or "-cross" (the important one).
74 >
75 > I.e., my only change is really to the situation where your keywords are
76 > "foo bar" and a package has "foo -bar". Currently, the package is not
77 > masked (because "foo" matches "foo"); I want it masked (because "bar"
78 > negatively matches "-bar"). (In fact, the current truck totally ignores
79 > "-bar" in a package's keywords, assuming that no package has "-bar" and
80 > either "bar" or "~bar" and that simply failing to match any keyword you
81 > have, since you won't have "-bar", is sufficient.)
82
83 And... that sucks imo. :)
84
85 You're proposing further overloading of ACCEPT_KEYWORDS; how would
86 this fly for package.keywords?
87
88 Alternative that comes to mind (and is cleaner) is to actually have
89 portage *know* it's doing cross compilation; eliminates a fair bit of
90 the nasty ROOT detection it has to do; that cleans up the innards a
91 bit, but for it to work you would need a RESTRICT=cross-compile to
92 mark packages that can't be x-compiled as unusable (yet another
93 visibility filter, yay!) :)
94
95 Downside, such a restrict isn't fine grained per arch; pkg may
96 cross-compile fine for arches running linux, but explode targettubg
97 gfbsd for example.
98
99 My 2 cents at least.
100 ~harring

Replies

Subject Author
Re: [gentoo-portage-dev] [RFC] Mask packages that don't cross-compile Daniel Barkalow <barkalow@××××××××.org>