1 |
On 11/18/18 6:51 PM, Rich Freeman wrote: |
2 |
> On Sun, Nov 18, 2018 at 5:40 PM Zac Medico <zmedico@g.o> wrote: |
3 |
>> |
4 |
>> On 11/18/18 1:55 PM, Rich Freeman wrote: |
5 |
>>> |
6 |
>>> My idea is to basically have portage generate a tag with all the info |
7 |
>>> needed to identify the "right" package, take a hash of it, and then |
8 |
>>> stick that in the filename. Then when portage is looking for a binary |
9 |
>>> package to use at install time it generates the same tag using the |
10 |
>>> same algorithm and looks for a matching hash. |
11 |
>> |
12 |
>> We've already had this handled for a couple years now, via |
13 |
>> FEATURES=binpkg-multi-instance. |
14 |
> |
15 |
> According to the make.conf manpage this simply numbers builds. So, if |
16 |
> you build something twice with the same config you end up with two |
17 |
> duplicate files (wasteful). Presumably if you had a large collection |
18 |
> of these packages portage would have to read the metadata within each |
19 |
> one to figure out which one is appropriate to install. That would be |
20 |
> expensive if IO is slow, such as when fetching packages online |
21 |
> on-demand. |
22 |
> |
23 |
> But, it obviously is somewhat of an improvement for Roy's use case. |
24 |
> |
25 |
> IMO using a content-hash of certain metadata would eliminate |
26 |
> duplication, and based on filename alone it would be clear whether the |
27 |
> sought-after binary package exists or not. As with the build numbers |
28 |
> you couldn't tell from filename inspection what packages you have, but |
29 |
> if you know what you want you could immediately find it. IMO trying |
30 |
> to cram all that metadata into a filename to make them more |
31 |
> transparent isn't a good idea, and using hashes lets the user set |
32 |
> their own policy regarding flexibility. Heck, you could auto-gen |
33 |
> symlinks for subsets of metadata (ie, the same file could be linked |
34 |
> from a file that specifies its USE flags but not its CFLAGS, so it |
35 |
> would be found if either an exact hit on CFLAGS was sought or if |
36 |
> CFLAGS were considered unimportant). |
37 |
> |
38 |
> But, I'm certainly not suggesting that you're not allowed to go to bed |
39 |
> until you've built it. :) |
40 |
|
41 |
The existing ${PKGDIR}/Packages file optimizes metadata access for both |
42 |
local an remote access, and performs well for reasonable numbers of |
43 |
packages. |
44 |
|
45 |
If you insist on mixing binary packages in the same ${PKGDIR} for a |
46 |
large number of alternative configurations, then it will not scale |
47 |
unless you create a way to send your local configuration to the server |
48 |
so that it can select the relevant package list for you. |
49 |
|
50 |
However, bear in mind that mixing alternative configurations in the same |
51 |
${PKGDIR} might lead to undesirable results if there is anything |
52 |
relevant that is unaccounted for in the package metadata. Possible |
53 |
unaccounted things may include: |
54 |
|
55 |
1) glibc version the package was built against |
56 |
2) symbols and/or sonames not accounted for by slot operator dependencies |
57 |
3) soname dependencies (--usepkgonly + --ignore-soname-deps=n handles this) |
58 |
-- |
59 |
Thanks, |
60 |
Zac |