Gentoo Archives: gentoo-catalyst

From: Felix Bier <Felix.Bier@×××××××××××××.com>
To: "gentoo-catalyst@l.g.o" <gentoo-catalyst@l.g.o>
Subject: Re: [Newsletter] Re: [gentoo-catalyst] [PATCH 2/2] Move from PORTDIR_OVERLAY to repos.conf
Date: Sun, 18 Oct 2020 13:58:06
Message-Id: f473e9d22d3cbbb99b374dd90b842e3a5b07f935.camel@rohde-schwarz.com
In Reply to: Re: [gentoo-catalyst] [PATCH 2/2] Move from PORTDIR_OVERLAY to repos.conf by Matt Turner
1 Am Samstag, den 17.10.2020, 13:11 -0700 schrieb Matt Turner:
2 > On Sat, Oct 17, 2020 at 12:00 PM Felix Bier
3 > <Felix.Bier@×××××××××××××.com> wrote:
4 > >
5 > > This commit fixes the following issues:
6 > >
7 > >   * The PORTDIR_OVERLAY variable has been deprecated by Gentoo.
8 > >
9 > >     With this commit, the variable is no longer written to the
10 > >     generated make.conf. Instead, a config file
11 > >     /etc/portage/repos.conf/<repo-name>.conf
12 > >     is generated for each overlay. The repo name is read from the
13 > >     overlay using the portage API. Internally, portage parses
14 > >     metadata/layout.conf and profiles/repo_name to obtain the name.
15 > >
16 > >     References:
17 > >     https://wiki.gentoo.org/wiki//etc/portage/make.conf
18 > >     https://wiki.gentoo.org/wiki//etc/portage/repos.conf
19 > >
20 > >   * All overlays were copied into the same target directory. If the
21 > >     same file name occurred in multiple overlays, the last overlay
22 > >     would overwrite all previous files with this name. In
23 > > particular,
24 > >     only the metadata/layout.conf of the last overlay was retained,
25 > >     so it was not possible to reference the other overlays e.g. via
26 > >     the masters entry in the layout.conf or the portage-2 syntax
27 > >     for specifying a parent profile from another overlay. Also,
28 > >     this created problems when the overlays contained ebuilds
29 > >     for the same package, but with differing versions, because
30 > >     after copying, the target directory contained both versions of
31 > > the
32 > >     ebuild but only the manifest file of the last overlay.
33 > >
34 > >     With this commit, each overlay is copied into a separate
35 > >     sub-directory, e.g. /var/gentoo/repos/local/<repo-name>/.
36 > >     This directory is referenced via the location entry in the
37 > >     generated /etc/portage/repos.conf/<repo-name>.conf.
38 > > ---
39 >
40 > Hello,
41 >
42 > Thank you for the patches. I'm happy to see them.
43 >
44 > I cannot apply the patches however. This one in particular is badly
45 > line wrapped by your mail client. I tried fixing it up, but either
46 > failed or don't know what this is supposed to apply to.
47 >
48 > It looks like the intention is for this to apply to the
49 > catalyst-3.0-stable branch since it discusses copying overlays into a
50 > subdirectory, rather than any mention of squashfs snapshots.
51 >
52 > I really don't want new feature work on the catalyst-3.0-stable
53 > branch, for example. If that is the target, then please consider
54 > rebasing the work onto the master branch.
55 >
56 > Matt
57
58 Hello Matt,
59 thank you for the initial review.
60
61 I'm sorry for the formatting issues, I will check my mail client's
62 format settings and resend the patches.
63
64 The patches are intendend for the master branch. I agree that this
65 feature should not be in the stable branch.
66
67 My understanding is that in the master branch, the squashfs is only
68 used for the main repository, whereas the overlays are still copied as
69 directories (in the StageBase.portage_overlay() function).
70
71 This patch only removes PORTDIR_OVERLAY, not PORTDIR, so it should not
72 be a problem that the main repository is squashed. I kept the helper
73 functions that this patch adds general, so that they can be reused for
74 a later PORTDIR removal, but I would prefer to do that in a separate
75 step.
76
77 I don't know if there are plans to also switch the overlays to
78 squashfs. My intuition would be that the overlays would usually be much
79 smaller than the main repository, so squashing them would have less
80 benefit. Even if there is a plan to switch the overlays to squashfs (or
81 bind-mounting, which I would prefer), I think my patch would still be
82 helpful for that, since it would not be possible to create multiple
83 mounts with the same target directory (such as /var/db/repo/local). So
84 creating subdirectories (/var/db/repo/local/overlay1,
85 /var/db/repo/local/overlay2 etc.) would still be needed.
86
87 Best regards,
88 Felix

Replies