Gentoo Archives: gentoo-portage-dev

From: Rich Freeman <rich0@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] Re: [RFC] Improving Gentoo package format
Date: Sun, 11 Nov 2018 18:42:03
Message-Id: CAGfcS_=7RNpGO0OxT3rbEX-V2rGkM+q93zmDvZs-F6efGXmX6w@mail.gmail.com
In Reply to: Re: [gentoo-portage-dev] Re: [RFC] Improving Gentoo package format by "M. J. Everitt"
1 On Sun, Nov 11, 2018 at 12:31 PM M. J. Everitt <m.j.everitt@×××.org> wrote:
2 >
3 > Binpkgs are also a popular component of a few downstream distro's based on
4 > Gentoo (thinking pentoo right now as an easy example).
5 >
6 > So we don't want to break existing users of this format without considering
7 > the ramifications for these scenarios, as you'll have some very grumpy devs...
8 >
9
10 I'd argue that they'd be more important for Gentoo if they were more
11 useful. IMO the main limitation with them is the inability to
12 auto-download them from a repository, detecting the binpkg USE flags
13 BEFORE downloading. This is why I suggested hashing the USE flags or
14 similar and sticking that in the filename.
15
16 Obviously you can't host a repository with all the USE combinations.
17 However, you could have a reference repo and the package manager could
18 check it before doing a build. If you get a hit then you can install
19 the binpkg. If you don't then you can do a source build.
20
21 Portage already checks the USE flags inside the binpkg before merging
22 it and by default doesn't use a non-matching binpkg. The problem with
23 the current approach is:
24 1. You have to download the package to check this (could be a big file).
25 2. You can't host multiple versions of a binpkg with different USE
26 flags since the filenames collide.
27
28 I suggested a content hash because you can use it for an arbitrary
29 amount of metadata, vs having to cram arch/USE/multilib and I'm sure
30 something I'm missing into a filename. Make the hash as short as is
31 economical - it isn't like we have THAT many permutations, the PM can
32 still check the internal metadata, and this isn't a security feature.
33
34 --
35 Rich

Replies

Subject Author
Re: [gentoo-portage-dev] Re: [RFC] Improving Gentoo package format "M. J. Everitt" <m.j.everitt@×××.org>