1 |
On Thursday 22 October 2009 11:26:58 Thomas Sachau wrote: |
2 |
> Mike Frysinger schrieb: |
3 |
> > On Sunday 18 October 2009 14:46:07 Thomas Sachau wrote: |
4 |
> >> Mike Frysinger schrieb: |
5 |
> >>> how do you control whether the multilib headers are needed ? it'll |
6 |
> >>> probably make sense in general, but there are def some packages where |
7 |
> >>> this will only get in the way (the toolchain ones). |
8 |
> >> |
9 |
> >> What do you mean here? If the diff between ABIs makes sense to install |
10 |
> >> seperate versions? |
11 |
> > |
12 |
> > some packages (like glibc and linux-headers) already handle the multilib |
13 |
> > situation. forcing the unnecessary Gentoo layer into the stack can |
14 |
> > easily break things. |
15 |
> |
16 |
> For glibc, it is avoided since it has the "multilib" useflag. If this is |
17 |
> enabled, it indicates for me that the package does handle everything for |
18 |
> itself, so multilib-portage does handle it as if it would be a normal |
19 |
> package without multi-ABI request. |
20 |
> Since linux-headers do also some special multilib handling, could you also |
21 |
> add a "multilib" useflag for them? Currently i have an exception for them |
22 |
> in my code to prevent problems for other packages. |
23 |
|
24 |
the linux-headers package doesnt have any multilib handling in them. the |
25 |
linux kernel itself takes care of installing proper headers for all ABIs |
26 |
(since they differ very little). it isnt possible to enable/disable this |
27 |
behavior afaik, so USE=multilib in the package makes no sense. |
28 |
|
29 |
perhaps cram all of these into a hidden USE expanded variable "EABI" ... but |
30 |
this is kind of a bad poor hack in face of creating a new dedicated variable |
31 |
to declare/control multilib settings. |
32 |
|
33 |
> I assume that ever package not having a multilib useflag does not any |
34 |
> multilib-specific action. To check, if the header files differ per ABI, i |
35 |
> save them for both ABIs, then diff them and create ABI-specific header |
36 |
> files with a wrapper for all header files, that differ. The rest is just |
37 |
> installed as usual. |
38 |
|
39 |
that should obviously work in general |
40 |
|
41 |
> >>> how do you differentiate between packages where multi ABIs make no |
42 |
> >>> sense ? for example, most packages that dont install any libraries but |
43 |
> >>> just binaries. let's use the simple package app-text/tree. |
44 |
> >> |
45 |
> >> I dont differentiate. Currently i build for every ABI, if lib32 useflag |
46 |
> >> is set and multilib useflag is not set. The idea behind it is to allow |
47 |
> >> the installation of additional 32bit binaries, if requested. |
48 |
> > |
49 |
> > that's is an immense waste of time. if we ran all the source phases for |
50 |
> > a single ABI in one go, it should be easy to dynamically detect when a |
51 |
> > multilib multipass is necessary (by looking at library paths in $D). and |
52 |
> > for the odd package out, create a hook of some sort (EMULTIABI=true) to |
53 |
> > force behavior. |
54 |
> > |
55 |
> > i dont think there is any inherit reliance on running the multilib pass |
56 |
> > on each src step every time (other than that was easiest to implement) ? |
57 |
> |
58 |
> For packages with header files, i need to run all phases for both ABIs to |
59 |
> check, if the header files are ABI specific. |
60 |
> So it would require a check for installed libs and installed header files. |
61 |
> And its more work since it requires both changes to the ebuild and emerge |
62 |
> command. |
63 |
|
64 |
my point is to skip multilib phases for a package that only installs |
65 |
executables. i dont think you need any changes to ebuilds to support this. |
66 |
if you run all src steps and then check for include files/libs in the $D dir, |
67 |
you know at that point whether you need to re-run the src steps for all ABIs. |
68 |
|
69 |
> > if it's a binary package, we know the ABI of it ahead of time. so if the |
70 |
> > package declared the binary ABI that it uses, then portage could handle |
71 |
> > the rest (making sure the deps are resolved against the ABI that it |
72 |
> > requires). we dont want to rewrite every binary ebuild to include an |
73 |
> > explicit [foo] ABI flag on each of its deps. |
74 |
> |
75 |
> This would require additional vars for multilib handling, which would |
76 |
> require inclusion in EAPI-3 or in a future EAPI, if the current process |
77 |
> with EAPIs is continued. |
78 |
> |
79 |
> With the current implementation, i try to stay EAPI-independent, so the |
80 |
> changes can be implemented without having to wait for aproval of another |
81 |
> EAPI. |
82 |
|
83 |
this is an edge case that the rest of the implementation doesnt really need to |
84 |
rely on. in other words, we spec/prototype the right solution for this part |
85 |
for future EAPIs. |
86 |
|
87 |
now that i think about it more, i dont think explicit USE deps on these |
88 |
packages is really EAPI compliant either. for example, you cant change |
89 |
quake4-bin's depends from like "x11-libs/libXext" to "x11-libs/libXext[x86]" |
90 |
because that package doesnt have x86 in IUSE, nor does it make sense to add |
91 |
it. |
92 |
|
93 |
an EAPI change would be required anyways to handle funky source packages like |
94 |
wine where normally it's a 32bit binary, but it can be built as a 64bit binary |
95 |
via USE flags ... |
96 |
-mike |