* [gentoo-portage-dev] @sets and @profile does not work when ROOT=PORTAGE_CONFIGROOT=/my/new/root @ 2015-10-21 16:47 Joakim Tjernlund 2015-10-22 4:35 ` Zac Medico 0 siblings, 1 reply; 15+ messages in thread From: Joakim Tjernlund @ 2015-10-21 16:47 UTC (permalink / raw To: gentoo-portage-dev@lists.gentoo.org I have enabled @sets and @profile in my own profile and if I add some pkg to either my new set or @profile in ROOT=PORTAGE_CONFIGROOT=/ then emerge -aNDuv world notices this and pulls in the new pkg. Then I clone / to /my/new/root and add a pkg @profile or my set ROOT=/my/new/root PORTAGE_CONFIGROOT=/my/new/root emerge -aNDuv world nothing happens. This feels like @profile and @sets looks in ROOT=PORTAGE_CONFIGROOT=/ instead of ROOT=PORTAGE_CONFIGROOT=/my/new/root if I in my new ROOT(/my/new/root) add pkg to the @system set it works. Does this make sense to you? Jocke ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] @sets and @profile does not work when ROOT=PORTAGE_CONFIGROOT=/my/new/root 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 0 siblings, 1 reply; 15+ messages in thread From: Zac Medico @ 2015-10-22 4:35 UTC (permalink / raw To: gentoo-portage-dev On 10/21/2015 09:47 AM, Joakim Tjernlund wrote: > I have enabled @sets and @profile in my own profile and if I add > some pkg to either my new set or @profile in ROOT=PORTAGE_CONFIGROOT=/ > then emerge -aNDuv world notices this and pulls in the new pkg. > > Then I clone / to /my/new/root and add a pkg @profile or my set > ROOT=/my/new/root PORTAGE_CONFIGROOT=/my/new/root emerge -aNDuv world nothing happens. > > This feels like @profile and @sets looks in ROOT=PORTAGE_CONFIGROOT=/ > instead of ROOT=PORTAGE_CONFIGROOT=/my/new/root > > if I in my new ROOT(/my/new/root) add pkg to the @system set it works. > > Does this make sense to you? > > Jocke > Are there any special details about your set configuration that we might need to consider? The following strace command seems to show that load_emerge_config uses the correct world file when the ROOT variable is set: $ ROOT=/mnt/gentoo strace python -c 'from _emerge.actions import load_emerge_config; load_emerge_config().target_config.setconfig.getSetAtoms("world")' 2>&1 | grep world stat("/usr/lib64/python3.4/site-packages/_emerge/create_world_atom.py", {st_mode=S_IFREG|0644, st_size=4414, ...}) = 0 stat("/usr/lib64/python3.4/site-packages/_emerge/create_world_atom.py", {st_mode=S_IFREG|0644, st_size=4414, ...}) = 0 open("/usr/lib64/python3.4/site-packages/_emerge/__pycache__/create_world_atom.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 4 read(4, "# required by @world (argument)\n"..., 8192) = 8192 read(4, "# required by @world (argument)\n"..., 8192) = 8192 stat("/mnt/gentoo/var/lib/portage/world", {st_mode=S_IFREG|0644, st_size=14364, ...}) = 0 stat("/mnt/gentoo/var/lib/portage/world", {st_mode=S_IFREG|0644, st_size=14364, ...}) = 0 open("/mnt/gentoo/var/lib/portage/world", O_RDONLY|O_CLOEXEC) = 4 stat("/mnt/gentoo/var/lib/portage/world_sets", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 stat("/mnt/gentoo/var/lib/portage/world_sets", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 open("/mnt/gentoo/var/lib/portage/world_sets", O_RDONLY|O_CLOEXEC) = 4 stat("/mnt/gentoo/var/lib/portage/world", {st_mode=S_IFREG|0644, st_size=14364, ...}) = 0 stat("/mnt/gentoo/var/lib/portage/world", {st_mode=S_IFREG|0644, st_size=14364, ...}) = 0 open("/mnt/gentoo/var/lib/portage/world", O_RDONLY|O_CLOEXEC) = 4 stat("/mnt/gentoo/var/lib/portage/world_sets", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 stat("/mnt/gentoo/var/lib/portage/world_sets", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 open("/mnt/gentoo/var/lib/portage/world_sets", O_RDONLY|O_CLOEXEC) = 4 -- Thanks, Zac ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] @sets and @profile does not work when ROOT=PORTAGE_CONFIGROOT=/my/new/root 2015-10-22 4:35 ` Zac Medico @ 2015-10-22 7:05 ` Joakim Tjernlund 2015-10-22 15:54 ` Zac Medico 0 siblings, 1 reply; 15+ messages in thread From: Joakim Tjernlund @ 2015-10-22 7:05 UTC (permalink / raw To: gentoo-portage-dev@lists.gentoo.org On Wed, 2015-10-21 at 21:35 -0700, Zac Medico wrote: > On 10/21/2015 09:47 AM, Joakim Tjernlund wrote: > > I have enabled @sets and @profile in my own profile and if I add > > some pkg to either my new set or @profile in ROOT=PORTAGE_CONFIGROOT=/ > > then emerge -aNDuv world notices this and pulls in the new pkg. > > > > Then I clone / to /my/new/root and add a pkg @profile or my set > > ROOT=/my/new/root PORTAGE_CONFIGROOT=/my/new/root emerge -aNDuv world nothing happens. > > > > This feels like @profile and @sets looks in ROOT=PORTAGE_CONFIGROOT=/ > > instead of ROOT=PORTAGE_CONFIGROOT=/my/new/root > > > > if I in my new ROOT(/my/new/root) add pkg to the @system set it works. > > > > Does this make sense to you? > > > > Jocke > > > > Are there any special details about your set configuration that we might > need to consider? The following strace command seems to show that > load_emerge_config uses the correct world file when the ROOT variable is > set: 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=/ ? > > $ ROOT=/mnt/gentoo strace python -c 'from _emerge.actions import > load_emerge_config; > load_emerge_config().target_config.setconfig.getSetAtoms("world")' 2>&1 > > grep world > stat("/usr/lib64/python3.4/site-packages/_emerge/create_world_atom.py", > {st_mode=S_IFREG|0644, st_size=4414, ...}) = 0 > stat("/usr/lib64/python3.4/site-packages/_emerge/create_world_atom.py", > {st_mode=S_IFREG|0644, st_size=4414, ...}) = 0 > open("/usr/lib64/python3.4/site-packages/_emerge/__pycache__/create_world_atom.cpython-34.pyc", > O_RDONLY|O_CLOEXEC) = 4 > read(4, "# required by @world (argument)\n"..., 8192) = 8192 > read(4, "# required by @world (argument)\n"..., 8192) = 8192 > stat("/mnt/gentoo/var/lib/portage/world", {st_mode=S_IFREG|0644, > st_size=14364, ...}) = 0 > stat("/mnt/gentoo/var/lib/portage/world", {st_mode=S_IFREG|0644, > st_size=14364, ...}) = 0 > open("/mnt/gentoo/var/lib/portage/world", O_RDONLY|O_CLOEXEC) = 4 > stat("/mnt/gentoo/var/lib/portage/world_sets", {st_mode=S_IFREG|0644, > st_size=0, ...}) = 0 > stat("/mnt/gentoo/var/lib/portage/world_sets", {st_mode=S_IFREG|0644, > st_size=0, ...}) = 0 > open("/mnt/gentoo/var/lib/portage/world_sets", O_RDONLY|O_CLOEXEC) = 4 > stat("/mnt/gentoo/var/lib/portage/world", {st_mode=S_IFREG|0644, > st_size=14364, ...}) = 0 > stat("/mnt/gentoo/var/lib/portage/world", {st_mode=S_IFREG|0644, > st_size=14364, ...}) = 0 > open("/mnt/gentoo/var/lib/portage/world", O_RDONLY|O_CLOEXEC) = 4 > stat("/mnt/gentoo/var/lib/portage/world_sets", {st_mode=S_IFREG|0644, > st_size=0, ...}) = 0 > stat("/mnt/gentoo/var/lib/portage/world_sets", {st_mode=S_IFREG|0644, > st_size=0, ...}) = 0 > open("/mnt/gentoo/var/lib/portage/world_sets", O_RDONLY|O_CLOEXEC) = 4 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] @sets and @profile does not work when ROOT=PORTAGE_CONFIGROOT=/my/new/root 2015-10-22 7:05 ` Joakim Tjernlund @ 2015-10-22 15:54 ` Zac Medico 2015-10-22 18:29 ` Joakim Tjernlund 0 siblings, 1 reply; 15+ messages in thread From: Zac Medico @ 2015-10-22 15:54 UTC (permalink / raw To: gentoo-portage-dev 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. -- Thanks, Zac ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] @sets and @profile does not work when ROOT=PORTAGE_CONFIGROOT=/my/new/root 2015-10-22 15:54 ` Zac Medico @ 2015-10-22 18:29 ` Joakim Tjernlund 2015-10-22 18:54 ` Zac Medico 2015-10-23 1:36 ` [gentoo-portage-dev] [PATCH] RepoConfigLoader: allow subsitution of variables like ROOT in repos.conf Zac Medico 0 siblings, 2 replies; 15+ messages in thread From: Joakim Tjernlund @ 2015-10-22 18:29 UTC (permalink / raw To: gentoo-portage-dev@lists.gentoo.org 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? Can I use %(PORTAGE_CONFIGROOT) in repos.conf too? or is it not needed? ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] @sets and @profile does not work when ROOT=PORTAGE_CONFIGROOT=/my/new/root 2015-10-22 18:29 ` Joakim Tjernlund @ 2015-10-22 18:54 ` Zac Medico 2015-10-22 19:16 ` Joakim Tjernlund ` (2 more replies) 2015-10-23 1:36 ` [gentoo-portage-dev] [PATCH] RepoConfigLoader: allow subsitution of variables like ROOT in repos.conf Zac Medico 1 sibling, 3 replies; 15+ messages in thread From: Zac Medico @ 2015-10-22 18:54 UTC (permalink / raw To: gentoo-portage-dev 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. -- Thanks, Zac ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] @sets and @profile does not work when ROOT=PORTAGE_CONFIGROOT=/my/new/root 2015-10-22 18:54 ` Zac Medico @ 2015-10-22 19:16 ` Joakim Tjernlund 2015-10-22 19:25 ` Zac Medico 2015-10-23 5:03 ` [gentoo-portage-dev] " Duncan 2015-10-23 9:21 ` [gentoo-portage-dev] " Joakim Tjernlund 2 siblings, 1 reply; 15+ messages in thread From: Joakim Tjernlund @ 2015-10-22 19:16 UTC (permalink / raw To: gentoo-portage-dev@lists.gentoo.org 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' ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] @sets and @profile does not work when ROOT=PORTAGE_CONFIGROOT=/my/new/root 2015-10-22 19:16 ` Joakim Tjernlund @ 2015-10-22 19:25 ` Zac Medico 2015-10-22 20:54 ` Joakim Tjernlund 0 siblings, 1 reply; 15+ messages in thread From: Zac Medico @ 2015-10-22 19:25 UTC (permalink / raw To: gentoo-portage-dev 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. -- Thanks, Zac ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] @sets and @profile does not work when ROOT=PORTAGE_CONFIGROOT=/my/new/root 2015-10-22 19:25 ` Zac Medico @ 2015-10-22 20:54 ` Joakim Tjernlund 2015-10-22 21:08 ` Zac Medico 0 siblings, 1 reply; 15+ messages in thread From: Joakim Tjernlund @ 2015-10-22 20:54 UTC (permalink / raw To: gentoo-portage-dev@lists.gentoo.org 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? Jocke ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] @sets and @profile does not work when ROOT=PORTAGE_CONFIGROOT=/my/new/root 2015-10-22 20:54 ` Joakim Tjernlund @ 2015-10-22 21:08 ` Zac Medico 0 siblings, 0 replies; 15+ messages in thread 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 [flat|nested] 15+ messages in thread
* [gentoo-portage-dev] Re: @sets and @profile does not work when ROOT=PORTAGE_CONFIGROOT=/my/new/root 2015-10-22 18:54 ` Zac Medico 2015-10-22 19:16 ` Joakim Tjernlund @ 2015-10-23 5:03 ` Duncan 2015-10-23 9:21 ` [gentoo-portage-dev] " Joakim Tjernlund 2 siblings, 0 replies; 15+ messages in thread From: Duncan @ 2015-10-23 5:03 UTC (permalink / raw To: gentoo-portage-dev Zac Medico posted on Thu, 22 Oct 2015 11:54:39 -0700 as excerpted: > On 10/22/2015 11:29 AM, Joakim Tjernlund wrote: >> On Thu, 2015-10-22 at 08:54 -0700, Zac Medico wrote: >>> 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 Thanks. That's a pattern I now recognize and identify elsewhere. =:^) And that recognition/identification presumably answers a low-priority (thus never asked) question I've had for some time about layman.conf, and what/why it uses variable interpolation with the same trailing s, which I hadn't understood until now. For me, the answer is now essentially "the trailing 's' is an artifact of the python implementation and its use of the configparser lib, and yes, it's necessary, and doesn't mean the path now needs a literal trailing 's' as well." Again, thanks. Seeing similar trailing-s usage should be way less confusing now. =:^) -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] @sets and @profile does not work when ROOT=PORTAGE_CONFIGROOT=/my/new/root 2015-10-22 18:54 ` Zac Medico 2015-10-22 19:16 ` Joakim Tjernlund 2015-10-23 5:03 ` [gentoo-portage-dev] " Duncan @ 2015-10-23 9:21 ` Joakim Tjernlund 2015-10-24 20:49 ` Zac Medico 2 siblings, 1 reply; 15+ messages in thread From: Joakim Tjernlund @ 2015-10-23 9:21 UTC (permalink / raw To: gentoo-portage-dev@lists.gentoo.org 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 Looking at that URL I wonder why not use ExtendedInterpolation ? This would look like any other variable used in portage. Jocke ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] @sets and @profile does not work when ROOT=PORTAGE_CONFIGROOT=/my/new/root 2015-10-23 9:21 ` [gentoo-portage-dev] " Joakim Tjernlund @ 2015-10-24 20:49 ` Zac Medico 0 siblings, 0 replies; 15+ messages in thread From: Zac Medico @ 2015-10-24 20:49 UTC (permalink / raw To: gentoo-portage-dev On 10/23/2015 02:21 AM, 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 > > Looking at that URL I wonder why not use ExtendedInterpolation ? > This would look like any other variable used in portage. We could use it under python3, but it doesn't appear to be available for python2. -- Thanks, Zac ^ permalink raw reply [flat|nested] 15+ messages in thread
* [gentoo-portage-dev] [PATCH] RepoConfigLoader: allow subsitution of variables like ROOT in repos.conf 2015-10-22 18:29 ` Joakim Tjernlund 2015-10-22 18:54 ` Zac Medico @ 2015-10-23 1:36 ` Zac Medico 2015-10-28 13:28 ` Brian Dolbec 1 sibling, 1 reply; 15+ messages in thread From: Zac Medico @ 2015-10-23 1:36 UTC (permalink / raw To: gentoo-portage-dev; +Cc: Zac Medico This makes it possible to sync repositories inside $ROOT. X-Gentoo-Bug: 563836 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=563836 --- pym/portage/repository/config.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py index a90a994..1060bc7 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -620,7 +620,12 @@ class RepoConfigLoader(object): treemap = {} ignored_map = {} ignored_location_map = {} - default_opts = {} + default_opts = { + "EPREFIX" : settings["EPREFIX"], + "EROOT" : settings["EROOT"], + "PORTAGE_CONFIGROOT" : settings["PORTAGE_CONFIGROOT"], + "ROOT" : settings["ROOT"], + } if "PORTAGE_REPOSITORIES" in settings: portdir = "" -- 2.4.9 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] [PATCH] RepoConfigLoader: allow subsitution of variables like ROOT in repos.conf 2015-10-23 1:36 ` [gentoo-portage-dev] [PATCH] RepoConfigLoader: allow subsitution of variables like ROOT in repos.conf Zac Medico @ 2015-10-28 13:28 ` Brian Dolbec 0 siblings, 0 replies; 15+ messages in thread From: Brian Dolbec @ 2015-10-28 13:28 UTC (permalink / raw To: gentoo-portage-dev On Thu, 22 Oct 2015 18:36:03 -0700 Zac Medico <zmedico@gentoo.org> wrote: > This makes it possible to sync repositories inside $ROOT. > > X-Gentoo-Bug: 563836 > X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=563836 > --- > pym/portage/repository/config.py | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/pym/portage/repository/config.py > b/pym/portage/repository/config.py index a90a994..1060bc7 100644 > --- a/pym/portage/repository/config.py > +++ b/pym/portage/repository/config.py > @@ -620,7 +620,12 @@ class RepoConfigLoader(object): > treemap = {} > ignored_map = {} > ignored_location_map = {} > - default_opts = {} > + default_opts = { > + "EPREFIX" : settings["EPREFIX"], > + "EROOT" : settings["EROOT"], > + "PORTAGE_CONFIGROOT" : > settings["PORTAGE_CONFIGROOT"], > + "ROOT" : settings["ROOT"], > + } > > if "PORTAGE_REPOSITORIES" in settings: > portdir = "" This looks good to me. -- Brian Dolbec <dolsen> ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2015-10-28 13:29 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 ` Zac Medico 2015-10-23 5:03 ` [gentoo-portage-dev] " Duncan 2015-10-23 9:21 ` [gentoo-portage-dev] " Joakim Tjernlund 2015-10-24 20:49 ` Zac Medico 2015-10-23 1:36 ` [gentoo-portage-dev] [PATCH] RepoConfigLoader: allow subsitution of variables like ROOT in repos.conf Zac Medico 2015-10-28 13:28 ` Brian Dolbec
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox