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 07:05:25
Message-Id: 1445497519.31293.50.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 Wed, 2015-10-21 at 21:35 -0700, Zac Medico wrote:
2 > On 10/21/2015 09:47 AM, Joakim Tjernlund wrote:
3 > > I have enabled @sets and @profile in my own profile and if I add
4 > > some pkg to either my new set or @profile in ROOT=PORTAGE_CONFIGROOT=/
5 > > then emerge -aNDuv world notices this and pulls in the new pkg.
6 > >
7 > > Then I clone / to /my/new/root and add a pkg @profile or my set
8 > > ROOT=/my/new/root PORTAGE_CONFIGROOT=/my/new/root emerge -aNDuv world nothing happens.
9 > >
10 > > This feels like @profile and @sets looks in ROOT=PORTAGE_CONFIGROOT=/
11 > > instead of ROOT=PORTAGE_CONFIGROOT=/my/new/root
12 > >
13 > > if I in my new ROOT(/my/new/root) add pkg to the @system set it works.
14 > >
15 > > Does this make sense to you?
16 > >
17 > > Jocke
18 > >
19 >
20 > Are there any special details about your set configuration that we might
21 > need to consider? The following strace command seems to show that
22 > load_emerge_config uses the correct world file when the ROOT variable is
23 > set:
24
25 I don't use world_sets, I have in my profile(/my/new/root/usr/local/portage/tmv3-target-overlay):
26 # > cat sets.conf
27 [CUSFPv3 sets]
28 class = portage.sets.files.StaticFileSet
29 multiset = true
30 directory = ${repository:tmv3-target-overlay}/sets/
31
32 [world]
33 class = portage.sets.base.DummyPackageSet
34 packages = @cusfpv3 @profile @selected @system
35
36 and in sets/:
37 # > cat sets/cusfpv3
38 net-ftp/ftp
39 net-ftp/tftp-hpa
40 net-ftp/vsftpd
41 ....
42
43 and now it hits me, this line:
44 directory = ${repository:tmv3-target-overlay}/sets/
45 does it always refer too ROOT=/ ?
46
47 >
48 > $ ROOT=/mnt/gentoo strace python -c 'from _emerge.actions import
49 > load_emerge_config;
50 > load_emerge_config().target_config.setconfig.getSetAtoms("world")' 2>&1
51 > > grep world
52 > stat("/usr/lib64/python3.4/site-packages/_emerge/create_world_atom.py",
53 > {st_mode=S_IFREG|0644, st_size=4414, ...}) = 0
54 > stat("/usr/lib64/python3.4/site-packages/_emerge/create_world_atom.py",
55 > {st_mode=S_IFREG|0644, st_size=4414, ...}) = 0
56 > open("/usr/lib64/python3.4/site-packages/_emerge/__pycache__/create_world_atom.cpython-34.pyc",
57 > O_RDONLY|O_CLOEXEC) = 4
58 > read(4, "# required by @world (argument)\n"..., 8192) = 8192
59 > read(4, "# required by @world (argument)\n"..., 8192) = 8192
60 > stat("/mnt/gentoo/var/lib/portage/world", {st_mode=S_IFREG|0644,
61 > st_size=14364, ...}) = 0
62 > stat("/mnt/gentoo/var/lib/portage/world", {st_mode=S_IFREG|0644,
63 > st_size=14364, ...}) = 0
64 > open("/mnt/gentoo/var/lib/portage/world", O_RDONLY|O_CLOEXEC) = 4
65 > stat("/mnt/gentoo/var/lib/portage/world_sets", {st_mode=S_IFREG|0644,
66 > st_size=0, ...}) = 0
67 > stat("/mnt/gentoo/var/lib/portage/world_sets", {st_mode=S_IFREG|0644,
68 > st_size=0, ...}) = 0
69 > open("/mnt/gentoo/var/lib/portage/world_sets", O_RDONLY|O_CLOEXEC) = 4
70 > stat("/mnt/gentoo/var/lib/portage/world", {st_mode=S_IFREG|0644,
71 > st_size=14364, ...}) = 0
72 > stat("/mnt/gentoo/var/lib/portage/world", {st_mode=S_IFREG|0644,
73 > st_size=14364, ...}) = 0
74 > open("/mnt/gentoo/var/lib/portage/world", O_RDONLY|O_CLOEXEC) = 4
75 > stat("/mnt/gentoo/var/lib/portage/world_sets", {st_mode=S_IFREG|0644,
76 > st_size=0, ...}) = 0
77 > stat("/mnt/gentoo/var/lib/portage/world_sets", {st_mode=S_IFREG|0644,
78 > st_size=0, ...}) = 0
79 > open("/mnt/gentoo/var/lib/portage/world_sets", O_RDONLY|O_CLOEXEC) = 4

Replies