Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] @sets and @profile does not work when ROOT=PORTAGE_CONFIGROOT=/my/new/root
Date: Sat, 24 Oct 2015 20:50:05
Message-Id: 562BEEF5.5070605@gentoo.org
In Reply to: Re: [gentoo-portage-dev] @sets and @profile does not work when ROOT=PORTAGE_CONFIGROOT=/my/new/root by Joakim Tjernlund
1 On 10/23/2015 02:21 AM, Joakim Tjernlund wrote:
2 > On Thu, 2015-10-22 at 11:54 -0700, Zac Medico wrote:
3 >> On 10/22/2015 11:29 AM, Joakim Tjernlund wrote:
4 >>> On Thu, 2015-10-22 at 08:54 -0700, Zac Medico wrote:
5 >>>> On 10/22/2015 12:05 AM, Joakim Tjernlund wrote:
6 >>>>> I don't use world_sets, I have in my profile(/my/new/root/usr/local/portage/tmv3-target-overlay):
7 >>>>> # > cat sets.conf
8 >>>>> [CUSFPv3 sets]
9 >>>>> class = portage.sets.files.StaticFileSet
10 >>>>> multiset = true
11 >>>>> directory = ${repository:tmv3-target-overlay}/sets/
12 >>>>>
13 >>>>> [world]
14 >>>>> class = portage.sets.base.DummyPackageSet
15 >>>>> packages = @cusfpv3 @profile @selected @system
16 >>>>>
17 >>>>> and in sets/:
18 >>>>> # > cat sets/cusfpv3
19 >>>>> net-ftp/ftp
20 >>>>> net-ftp/tftp-hpa
21 >>>>> net-ftp/vsftpd
22 >>>>> ....
23 >>>>>
24 >>>>> and now it hits me, this line:
25 >>>>> directory = ${repository:tmv3-target-overlay}/sets/
26 >>>>> does it always refer too ROOT=/ ?
27 >>>>
28 >>>> You need to use %(ROOT)s${repository:tmv3-target-overlay}/sets to
29 >>>> substitute $ROOT into the set configuration. For example, the default
30 >>>> set configuration located at /usr/share/portage/config/sets/portage.conf
31 >>>> does something similar with %(PORTAGE_CONFIGROOT)s.
32 >>>
33 >>> Nice! I am a bit puzzled over the trailing s in ..)s, is that a typo? if not
34 >>> what does it mean?
35 >>
36 >> The trailing s is required. It's python configparser interpolation syntax:
37 >>
38 >> https://docs.python.org/3/library/configparser.html#interpolation-of-values
39 >
40 > Looking at that URL I wonder why not use ExtendedInterpolation ?
41 > This would look like any other variable used in portage.
42
43 We could use it under python3, but it doesn't appear to be available for
44 python2.
45 --
46 Thanks,
47 Zac