From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id EB7F813888F for ; Thu, 22 Oct 2015 21:08:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 63213E0850; Thu, 22 Oct 2015 21:08:44 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 80A48E084C for ; Thu, 22 Oct 2015 21:08:43 +0000 (UTC) Received: from [10.128.12.146] (unknown [100.42.98.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: zmedico) by smtp.gentoo.org (Postfix) with ESMTPSA id 9E3FD34094F for ; Thu, 22 Oct 2015 21:08:42 +0000 (UTC) Subject: Re: [gentoo-portage-dev] @sets and @profile does not work when ROOT=PORTAGE_CONFIGROOT=/my/new/root To: gentoo-portage-dev@lists.gentoo.org References: <1445446043.31293.17.camel@transmode.se> <562867A7.3010108@gentoo.org> <1445497519.31293.50.camel@transmode.se> <562906C3.1040708@gentoo.org> <1445538549.31293.104.camel@transmode.se> <562930EF.1020500@gentoo.org> <1445541324.31293.107.camel@transmode.se> <56293823.8080705@gentoo.org> <1445547297.31293.110.camel@transmode.se> From: Zac Medico Message-ID: <56295056.8010802@gentoo.org> Date: Thu, 22 Oct 2015 14:08:38 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 In-Reply-To: <1445547297.31293.110.camel@transmode.se> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit X-Archives-Salt: 4409611d-0bc4-4823-bbc6-0ff3e747cf07 X-Archives-Hash: be1077a61174a784922df79fd26299bd 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