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] @sets and @profile does not work when ROOT=PORTAGE_CONFIGROOT=/my/new/root
Date: Thu, 22 Oct 2015 20:55:04
Message-Id: 1445547297.31293.110.camel@transmode.se
In Reply to: Re: [gentoo-portage-dev] @sets and @profile does not work when ROOT=PORTAGE_CONFIGROOT=/my/new/root by Zac Medico
1 On Thu, 2015-10-22 at 12:25 -0700, Zac Medico wrote:
2 > On 10/22/2015 12:16 PM, Joakim Tjernlund wrote:
3 > > On Thu, 2015-10-22 at 11:54 -0700, Zac Medico wrote:
4 > > > On 10/22/2015 11:29 AM, Joakim Tjernlund wrote:
5 > > > > On Thu, 2015-10-22 at 08:54 -0700, Zac Medico wrote:
6 > > > > > On 10/22/2015 12:05 AM, Joakim Tjernlund wrote:
7 > > > > > > I don't use world_sets, I have in my profile(/my/new/root/usr/local/portage/tmv3-target-overlay):
8 > > > > > > # > cat sets.conf
9 > > > > > > [CUSFPv3 sets]
10 > > > > > > class = portage.sets.files.StaticFileSet
11 > > > > > > multiset = true
12 > > > > > > directory = ${repository:tmv3-target-overlay}/sets/
13 > > > > > >
14 > > > > > > [world]
15 > > > > > > class = portage.sets.base.DummyPackageSet
16 > > > > > > packages = @cusfpv3 @profile @selected @system
17 > > > > > >
18 > > > > > > and in sets/:
19 > > > > > > # > cat sets/cusfpv3
20 > > > > > > net-ftp/ftp
21 > > > > > > net-ftp/tftp-hpa
22 > > > > > > net-ftp/vsftpd
23 > > > > > > ....
24 > > > > > >
25 > > > > > > and now it hits me, this line:
26 > > > > > > directory = ${repository:tmv3-target-overlay}/sets/
27 > > > > > > does it always refer too ROOT=/ ?
28 > > > > >
29 > > > > > You need to use %(ROOT)s${repository:tmv3-target-overlay}/sets to
30 > > > > > substitute $ROOT into the set configuration. For example, the default
31 > > > > > set configuration located at /usr/share/portage/config/sets/portage.conf
32 > > > > > does something similar with %(PORTAGE_CONFIGROOT)s.
33 > > > >
34 > > > > Nice! I am a bit puzzled over the trailing s in ..)s, is that a typo? if not
35 > > > > what does it mean?
36 > > >
37 > > > The trailing s is required. It's python configparser interpolation syntax:
38 > > >
39 > > > https://docs.python.org/3/library/configparser.html#interpolation-of-values
40 > > >
41 > > > > Can I use %(PORTAGE_CONFIGROOT) in repos.conf too? or is it not needed?
42 > > >
43 > > > Yes you can use it (but you need the trailing s). It's needed for any
44 > > > absolute paths that refer to /etc/portage.
45 > >
46 > > hmm, not /etc/portage but /usr/portage:
47 > > [gentoo]
48 > > location = %(PORTAGE_CONFIGROOT)s/usr/portage
49 > >
50 > > but then portage throws:
51 > > emerge -aNDuv world
52 > > !!! Error while reading repo config file: Bad value substitution:
53 > > section: [gentoo]
54 > > option : location
55 > > key : portage_configroot
56 > > rawval : /usr/portage
57 > >
58 > > !!! Unable to parse profile: '/etc/portage/make.profile'
59 > > !!! ParseError: Parent 'gentoo:default/linux/powerpc/ppc32/13.0' not found: '/usr/local/portage/tmv3
60 > > -target
61 > > -overlay/profiles/cusfpv3/parent'
62 > >
63 >
64 > Oh, repos.conf does not populate those variable, but we can easily add
65 > support for it.
66
67 That would be nice, this will make PORTAGE_CONFIGROOT=/my/new/root emerge --sync update
68 the repos in /my/new/root, right?
69
70 Jocke

Replies