Gentoo Archives: gentoo-dev

From: heroxbd <heroxbd@g.o>
To: gentoo-dev@g.o
Cc: redlizard@×××××××××.nl
Subject: [gentoo-dev] RFC: cartesian product extension to keyword system
Date: Mon, 29 Apr 2013 07:15:06
Message-Id: 87ppxdajv8.fsf@proton.in.awa.tohoku.ac.jp
1 Dear all,
2
3 In GLEP22[1], reasonable defaults has been introduced to prevent the
4 explosion of keywords. With the growth of Gentoo Prefix, however, a
5 substantial amount of keywords are introduced. Among them, duplex
6 information exists. For example, an ebuild keyworded x86-linux(Gentoo
7 Prefix on x86 linux) will certainly build on x86 (Gentoo vanilla on x86
8 linux). Furthermore if the ebuild has "amd64" keyword, it will certainly
9 build on amd64-linux too.
10
11 This duplication becomes more manifested during the development of
12 Gentoo Prefix on arm. Introducing an arm-linux keyword is objected by
13 developers because we are having too many keywords[2]. But it is far
14 from consensus yet, as people are already adding arm-linux to
15 ebuilds[2].
16
17 There were also a proposal to treat arm the same as arm-linux, but
18 received more objections for its vagueness.
19
20 Therefore we propose the following cartesian product extension to
21 keyword system.
22
23 a. introducing four more variables, in order, KEYWORDS_ARCH,
24 KEYWORDS_KERNEL, KEYWORDS_USERLAND, KEYWORDS_LIBC. An order relation
25 is defined as arch > kernel > userland > libc
26
27 b. KEYWORDS_var1 must be defined if KEYWORDS_var2 is defined and var2 <
28 var1. Otherwise it can be omitted.
29
30 c. KEYWORDS_PROD is defined as cartesian product of KEYWORDS_ARCH,
31 KEYWORDS_KERNEL, KEYWORDS_USERLAND, KEYWORDS_LIBC. Omitted variable
32 is interpreted as empty and not counted in the product. e.g., if
33 KEYWORDS_USERLAND and KEYWORDS_LIBC are not defined, KEYWORDS_PROD is
34 the product of KEYWORDS_ARCH and KEYWORDS_KERNEL.
35
36 c1. "~" is attached to KEYWORDS_PROD elements if any of its oprand has "~".
37
38 d. KEYWORDS is redefined as union of KEYWORDS_PROD and KEYWORDS (for
39 backward compatibility)
40
41 e. reasonable defaults in GLEP22 applys.
42
43 Therefore, for sys-devel/bison, the keywords proposed will be:
44
45 KEYWORDS="~hppa-hpux ~m68k-mint ~ppc-aix ~x64-solaris ~x86-interix
46
47 KEYWORDS_ARCH="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
48
49 KEYWORDS_KERNEL="~linux ~solaris ~freebsd ~fbsd ~macos"
50
51 Problems remaining:
52
53 a. how to do stablization in this case?
54
55 b. how to handle things that does not exist? e.g. sparc-macosx?
56
57 c. how to clean up confusions? e.g. x64-solaris vs amd64-solaris,
58 freebsd (Gentoo Prefix on FreeBSD) vs fbsd (Gentoo/FreeBSD)
59
60 Thanks,
61 Benda
62
63 1. http://www.gentoo.org/proj/en/glep/glep-0022.html
64
65 2. see sys-devel/bison, ~alpha ~amd64 ~amd64-fbsd ~amd64-linux ~arm ~arm-linux
66 ~hppa ~hppa-hpux ~ia64 ~ia64-hpux ~ia64-linux ~m68k ~m68k-mint ~mips
67 ~ppc ~ppc-aix ~ppc-macos ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd
68 ~sparc-solaris ~sparc64-solaris ~x64-freebsd ~x64-macos ~x64-solaris
69 ~x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~x86-linux ~x86-macos
70 ~x86-solaris

Replies