* Re: [gentoo-portage-dev] @sets and @profile does not work when ROOT=PORTAGE_CONFIGROOT=/my/new/root
@ 2015-10-22 21:08 99% ` Zac Medico
0 siblings, 0 replies; 1+ results
From: Zac Medico @ 2015-10-22 21:08 UTC (permalink / raw
To: gentoo-portage-dev
On 10/22/2015 01:54 PM, Joakim Tjernlund wrote:
> On Thu, 2015-10-22 at 12:25 -0700, Zac Medico wrote:
>> On 10/22/2015 12:16 PM, Joakim Tjernlund wrote:
>>> On Thu, 2015-10-22 at 11:54 -0700, Zac Medico wrote:
>>>> On 10/22/2015 11:29 AM, Joakim Tjernlund wrote:
>>>>> On Thu, 2015-10-22 at 08:54 -0700, Zac Medico wrote:
>>>>>> On 10/22/2015 12:05 AM, Joakim Tjernlund wrote:
>>>>>>> I don't use world_sets, I have in my profile(/my/new/root/usr/local/portage/tmv3-target-overlay):
>>>>>>> # > cat sets.conf
>>>>>>> [CUSFPv3 sets]
>>>>>>> class = portage.sets.files.StaticFileSet
>>>>>>> multiset = true
>>>>>>> directory = ${repository:tmv3-target-overlay}/sets/
>>>>>>>
>>>>>>> [world]
>>>>>>> class = portage.sets.base.DummyPackageSet
>>>>>>> packages = @cusfpv3 @profile @selected @system
>>>>>>>
>>>>>>> and in sets/:
>>>>>>> # > cat sets/cusfpv3
>>>>>>> net-ftp/ftp
>>>>>>> net-ftp/tftp-hpa
>>>>>>> net-ftp/vsftpd
>>>>>>> ....
>>>>>>>
>>>>>>> and now it hits me, this line:
>>>>>>> directory = ${repository:tmv3-target-overlay}/sets/
>>>>>>> does it always refer too ROOT=/ ?
>>>>>>
>>>>>> You need to use %(ROOT)s${repository:tmv3-target-overlay}/sets to
>>>>>> substitute $ROOT into the set configuration. For example, the default
>>>>>> set configuration located at /usr/share/portage/config/sets/portage.conf
>>>>>> does something similar with %(PORTAGE_CONFIGROOT)s.
>>>>>
>>>>> Nice! I am a bit puzzled over the trailing s in ..)s, is that a typo? if not
>>>>> what does it mean?
>>>>
>>>> The trailing s is required. It's python configparser interpolation syntax:
>>>>
>>>> https://docs.python.org/3/library/configparser.html#interpolation-of-values
>>>>
>>>>> Can I use %(PORTAGE_CONFIGROOT) in repos.conf too? or is it not needed?
>>>>
>>>> Yes you can use it (but you need the trailing s). It's needed for any
>>>> absolute paths that refer to /etc/portage.
>>>
>>> hmm, not /etc/portage but /usr/portage:
>>> [gentoo]
>>> location = %(PORTAGE_CONFIGROOT)s/usr/portage
>>>
>>> but then portage throws:
>>> emerge -aNDuv world
>>> !!! Error while reading repo config file: Bad value substitution:
>>> section: [gentoo]
>>> option : location
>>> key : portage_configroot
>>> rawval : /usr/portage
>>>
>>> !!! Unable to parse profile: '/etc/portage/make.profile'
>>> !!! ParseError: Parent 'gentoo:default/linux/powerpc/ppc32/13.0' not found: '/usr/local/portage/tmv3
>>> -target
>>> -overlay/profiles/cusfpv3/parent'
>>>
>>
>> Oh, repos.conf does not populate those variable, but we can easily add
>> support for it.
>
> That would be nice, this will make PORTAGE_CONFIGROOT=/my/new/root emerge --sync update
> the repos in /my/new/root, right?
Right.
--
Thanks,
Zac
^ permalink raw reply [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2015-10-21 16:47 [gentoo-portage-dev] @sets and @profile does not work when ROOT=PORTAGE_CONFIGROOT=/my/new/root Joakim Tjernlund
2015-10-22 4:35 ` Zac Medico
2015-10-22 7:05 ` Joakim Tjernlund
2015-10-22 15:54 ` Zac Medico
2015-10-22 18:29 ` Joakim Tjernlund
2015-10-22 18:54 ` Zac Medico
2015-10-22 19:16 ` Joakim Tjernlund
2015-10-22 19:25 ` Zac Medico
2015-10-22 20:54 ` Joakim Tjernlund
2015-10-22 21:08 99% ` Zac Medico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox