Gentoo Archives: gentoo-portage-dev

From: Joakim Tjernlund <joakim.tjernlund@×××××××××.se>
To: "gentoo-portage-dev@l.g.o" <gentoo-portage-dev@l.g.o>
Subject: Re: [gentoo-portage-dev] custom profiles?
Date: Sun, 15 Mar 2015 16:37:40
Message-Id: 1426437452.3123.80.camel@transmode.se
In Reply to: Re: [gentoo-portage-dev] custom profiles? by Zac Medico
1 On Sat, 2015-03-14 at 14:02 -0700, Zac Medico wrote:
2 > On 03/14/2015 12:30 PM, Joakim Tjernlund wrote:
3 > > On Sat, 2015-03-14 at 11:57 -0700, Zac Medico wrote:
4 > > > On 03/14/2015 11:41 AM, Joakim Tjernlund wrote:
5 > > > > On Sat, 2015-03-14 at 11:08 -0700, Zac Medico wrote:
6 > > > > > On 03/14/2015 09:12 AM, Joakim Tjernlund wrote:
7 > > > > > > On Wed, 2015-03-11 at 13:43 -0700, Zac Medico wrote:
8 > > > > > > > On 03/11/2015 01:16 PM, Joakim Tjernlund wrote:
9 > > > > > > > > On Wed, 2015-03-11 at 10:56 -0700, Zac Medico wrote:
10 > > > > > > > > > On 03/11/2015 08:48 AM, Joakim Tjernlund wrote:
11 > > > > > > > > > > On Sun, 2015-03-08 at 11:58 -0700, Zac Medico wrote:
12 > > > > > > > > > > > On 03/08/2015 10:01 AM, Joakim Tjernlund wrote:
13 > > > > > > > > > > > > On Sun, 2015-03-08 at 15:47 +0000, Joakim Tjernlund wrote:
14 > > > > > > > > > > > > >
15 > > > > > > > > > > > > > package.use/package.use.force is a bit different though:
16 > > > > > > > > > > > > > cat /etc/portage/package.use/qemu
17 > > > > > > > > > > > > > app-emulation/qemu vde -alsa -pulseaudio -bluetooth -opengl
18 > > > > > > > > > > > > > qemu_user_targets_x86_64
19 > > > > > > > > > > > > > xattr
20 > > > > > > > > > > > > > virtfs
21 > > > > > > > > > > > > > static-
22 > > > > > > > > > > > > > user
23 > > > > > > > > > > > > >
24 > > > > > > > > > > > > > #Needed by static-user
25 > > > > > > > > > > > > > sys-libs/zlib static-libs
26 > > > > > > > > > > > > > dev-libs/glib static-libs
27 > > > > > > > > > > > > > sys-apps/attr static-libs
28 > > > > > > > > > > > > >
29 > > > > > > > > > > > > > Moving this to package.use/package.use.force does not respect -alsa, -pulseaudio, -
30 > > > > > > > > > > > > > opengl
31 > > > > > > > > > > > > > all
32 > > > > > > > > > > > > > flags which has a - on them, emerge wants to turn them on again.
33 > > > > > > > > > > > > >
34 > > > > > > > > > > > > > Am I missing something?
35 > > > > > > > > > > > > > Using portage 2.2.18
36 > > > > > > > > > > > >
37 > > > > > > > > > > > > Appears one have to use package.use.mask for that.
38 > > > > > > > > > > > > cat package.use.mask
39 > > > > > > > > > > > > app-emulation/qemu alsa pulseaudio bluetooth opengl
40 > > > > > > > > > > > > It would be handy if one could use the same syntax as in
41 > > > > > > > > > > > > /etc/portage/package.use/qemu(-
42 > > > > > > > > > > > > alsa -
43 > > > > > > > > > > > > opengl
44 > > > > > > > > > > > > etc.)
45 > > > > > > > > > > > >
46 > > > > > > > > > > > > Jocke
47 > > > > > > > > > > > >
48 > > > > > > > > > > >
49 > > > > > > > > > > > Yes, the inverted use.mask logic can be confusing if you are not familiar with it. The
50 > > > > > > > > > > > negative
51 > > > > > > > > > > > flags
52 > > > > > > > > > > > have a
53 > > > > > > > > > > > special meaning within the context of of portage's "incremental stacking" behavior, so
54 > > > > > > > > > > > they
55 > > > > > > > > > > > can
56 > > > > > > > > > > > still
57 > > > > > > > > > > > be
58 > > > > > > > > > > > useful, though not in the same way that you you attempted to use them.
59 > > > > > >
60 > > > > > > Just noticed that USE flags in profiles/package.use.mask override everything so this
61 > > > > > > USE=thin emerge -av sys-fs/lvm2
62 > > > > > > will not turn on thin if thin is in profiles/package.use.mask
63 > > > > > > How can just change the default so a user can easily turn it on ?
64 > > > > >
65 > > > > > Generally, setting the USE environment variable like that is poor practice, because the setting
66 > > > > > will
67 > > > > > not
68 > > > > > persist the next time that you rebuild the package. So, you should set the flag in
69 > > > >
70 > > > >
71 > > > > I know, this was just an example to illustrate that it did not work.
72 > > > >
73 > > > > > /etc/portage/package.use. You can unmask the flag for lvm2 like this:
74 > > > > >
75 > > > > > echo "sys-fs/lvm2 -thin" >> /etc/portage/profile/package.use.mask
76 > > > >
77 > > > > You misunderstand, I have "sys-fs/lvm2 thin" in /etc/portage/profile/package.use.mask
78 > > > > and I want a user to able to override this setting, using USE=".." or adding it
79 > > > > to their local /etc/portage/package.use file/dir
80 > > >
81 > > > There's no other way to negate a use mask than to use /etc/portage/profile/{use.mask,package.use.mask}
82 > > > as I
83 > > > have described. I don't think that it makes much sense to negate a use mask for a single emerge
84 > > > invocation.
85 > > > If you want to do that, then why is the use flag masked anyway?
86 > >
87 > > I am putting tougher a profile for my company where I want to specify default
88 > > USE flags for different apps/libs. Then a user who knows what he/she is doing
89 > > should be able to override these defaults. It is not possible as far as I can tell to override negative
90 > > USE flags or is there?
91 >
92 > You can set default USE flags in the profile, and then the users can override those settings locally (both
93 > positively and negatively). You should not be using use.mask at all here. The profile can set USE="-flag"
94 > in make.defaults, or in packages.use, and the user can override that without having to mess with use.mask.
95
96 That is how I started, I added -thin etc. to profile's package.use and it didn't work so I moved over
97 to package.mask.
98 Now when I try with -thin again in profile's package.use it actually works!
99 I have no idea what got wrong the first time.
100 Anyhow, thank you for your patience. I will continue moving over all
101 Transmode stuff to our new profile the next few days :)
102
103 Jocke

Replies

Subject Author
Re: [gentoo-portage-dev] custom profiles? Joakim Tjernlund <joakim.tjernlund@×××××××××.se>