Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o, Joakim Tjernlund <Joakim.Tjernlund@××××××××.com>, "zmedico@g.o" <zmedico@g.o>
Subject: Re: [gentoo-portage-dev] profile.bashrc variables
Date: Wed, 20 Nov 2019 08:58:23
Message-Id: 5d2d8ebf-5f56-0b0c-b665-79b05d24946a@gentoo.org
In Reply to: Re: [gentoo-portage-dev] profile.bashrc variables by Joakim Tjernlund
1 On 11/19/19 11:38 PM, Joakim Tjernlund wrote:
2 > On Tue, 2019-11-19 at 22:40 -0800, Zac Medico wrote:
3 >> On 11/19/19 2:17 PM, Joakim Tjernlund wrote:
4 >>> cat profile.bashrc
5 >>> if [ "${HOSTNAME}" == "gentoo64.infinera.com" ]; then
6 >>> # This does not work, why?
7 >>> [ -z "$_once" ] && EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} -k n" && _once=1
8 >>> [ -z "$_fonce" ] && FEATURES="${FEATURES} buildpkg" && _fonce=1
9 >>> export EMERGE_DEFAULT_OPTS
10 >>> export FEATURES
11 >>> fi
12 >>>
13 >>> If I add logging inside I see that these are set but emerge
14 >>> does not build binpkgs, what am I missing ?
15 >>>
16 >>> sys-apps/portage-2.3.79
17 >>>
18 >>> Jocke
19 >>>
20 >>
21 >> You can use /etc/portage/package.env to modify FEATURES. The bashrc is
22 >> evaluated only when executing ebuilds, so it's not appropriate for
23 >> FEATURES modifications.
24 >
25 > I did try adding --buildpkg to EMERGE_DEFAULT_OPTS too, same result
26 > I do need to do this in the profile and last I tried package.env it didn't work
27 > in profiles, has that changed?
28
29 Oh, no that hasn't changed. The barrier for profile extensions is a bit
30 higher because it's governed by PMS, but we can also use profile-formats
31 to bypass PMS. We've got a similar bug open here:
32
33 https://bugs.gentoo.org/651208
34
35 > In general I think /etc/portage is just another profile so things like
36 > package.env should also work in a regular profile.
37 > While at package.env, the other day I wanted do in package.env:
38 > if not "cat/pkg" do my_extra.conf but I could not find
39 > a NOT syntax for package.env, is there one?
40
41 No, there's not. I guess we could express that as !cat/pkg.
42 --
43 Thanks,
44 Zac

Attachments

File name MIME type
signature.asc application/pgp-signature