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

Replies

Subject Author
Re: [gentoo-portage-dev] custom profiles? Zac Medico <zmedico@g.o>