Gentoo Archives: gentoo-dev

From: Kumba <kumba@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: multiple inheritance support for profiles
Date: Sun, 13 Aug 2006 04:08:01
Message-Id: 44DEA4FC.8090802@gentoo.org
In Reply to: Re: [gentoo-dev] RFC: multiple inheritance support for profiles by Andrew Gaffney
1 Andrew Gaffney wrote:
2 >
3 > This is pretty much exactly what Kumba was talking about. I didn't like
4 > the idea simply because it allowed the user to shoot themselves in the
5 > foot way too easily. It will also cause QA problems, since the profiles
6 > wouldn't be strictly controlled by the arch teams and releng anymore.
7
8 Just so it's clear, this is mostly what I was thinking up a few years ago when
9 what is the current profiling system was being figured out (back when we had
10 separate profile folders for everything -- ~2004.x timeframe). ferringb quickly
11 pointed a few flaws with letting the user have complete control over the
12 ordering, and so I revised my idea to have the base components fixed in a
13 specific order like so:
14
15 base:os:arch:userland
16
17 So a mips-unknown-linux-uclibc user would set a profile much like:
18 PORTAGE_PROFILE="base:linux:mips:uclibc:"
19
20 FreeBSD/x86 user might use:
21 PORTAGE_PROFILE="base:freebsd:x86:bsdlibc"
22
23 And so on. This would fix the core components' order in a specific way. Once
24 the four base elements are set, the user is free to add on "extra" nodes that
25 add or enhance the functionality of the core profile. Like hardened or
26 embedded, for example. (base:linux:x86:glibc:hardened)
27
28 Antarus added another idea on earlier today that'd make it more robust by making
29 the nodes have depends, and via that, portage can yell at the user if they mix
30 something improperly, say they have a glibc userland, and they try to add the
31 embedded profile. Since the idea of embedded with glibc is a bit silly
32 (Although not impossible), portage can do one of two things: yell at the user
33 that they need to switch to a uclibc userland, or ignore using the embedded
34 node, because embedded depends on uclibc.
35
36 My thinking in all of this is to make the profile/ folder layout a little saner,
37 but this idea has really only existed as just an idea. It's not had a really
38 good looking at by some of the portage experts aside from ferringb or antarus --
39 and they quickly highlighted several shortcomings. In a way, though, I kind of
40 envision profiles/ looking somewhat like this (Sample):
41
42 profiles/
43 |
44 |--base/
45 |
46 |--abi/
47 | |
48 | |--n32/
49 | |--o32/
50 | |--v9/
51 |
52 |--arch/
53 | |
54 | |--mips/
55 | |--sparc/
56 | |--x86/
57 |
58 |--endian/
59 | |
60 | |--be/
61 | |--le/
62 |
63 |--os/
64 | |
65 | |--linux/
66 | |--freebsd/
67 |
68 |--threads/
69 | |
70 | |--linuxthreads/
71 | |--nptl/
72 |
73 |--userland/
74 | |
75 | |--bsdlibc/
76 | |--glibc/
77 | |--uclibc/
78 |
79 |--xtra/
80 | |
81 | |--embedded/
82 | |--hardened/
83
84 Most arches I can imagine won't make use of half the nodes listed here, as some
85 are restricted in what they can do. Most of it is based on my experiences in
86 trying to devise future expandibility for the mips arch, as there are about a
87 zillion different ways to string things together for us, like so:
88
89 base:linux:mips:glibc:n32:nptl:be (mips big-endian, glibc, NPTL, N32 ABI)
90 base:linux:mips:uclibc:o32:linuxthreads:le:embedded (mips little-endian, uclibc,
91 linuxthreads, embedded, O32 ABI)
92 base:linux:mips:uclibc:n32:nptl:be (mips big-endian, uclibc, NPTL, N32 ABI)
93
94 And so on. Of course, not all of them are used, but it's a bad habit of mine to
95 think that far ahead into the future. Most of this is made up as I go along.
96 None of it has ever really been put down in writing, except one version that
97 Antarus examined a few months ago in what he called "Mix n' Match", or "Mixin"
98 form, and as more people ponder this idea and either shoot holes through it or
99 add on more ways to better implement it, I guess will determine whether or not
100 it'll ever be feasible.
101
102 I think if properly implemented right, it might allow for some degree of control
103 by the user while letting the devs keep users from completely shooting their own
104 legs off at the knee joint, and make the profile system more robust and saner to
105 manage.
106
107
108 Thoughts?
109
110
111 --Kumba
112
113 --
114 Gentoo/MIPS Team Lead
115 Gentoo Foundation Board of Trustees
116
117 "Such is oft the course of deeds that move the wheels of the world: small hands
118 do them because they must, while the eyes of the great are elsewhere." --Elrond
119 --
120 gentoo-dev@g.o mailing list