Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: lib/_emerge/
Date: Mon, 03 Feb 2020 20:30:43
Message-Id: 1580761756.7c6fda0e063ecc1f2411eaad20ea369dffd5bfe5.zmedico@gentoo
1 commit: 7c6fda0e063ecc1f2411eaad20ea369dffd5bfe5
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 3 20:10:01 2020 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 3 20:29:16 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=7c6fda0e
7
8 create_world_atom: fix outdated comments regarding greedy atoms
9
10 Fixes: 1342b456c460 ("Remove --update greedy SLOTs code from depgraph.select_files()")
11 Reported-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
12 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
13
14 lib/_emerge/create_world_atom.py | 11 ++++++-----
15 1 file changed, 6 insertions(+), 5 deletions(-)
16
17 diff --git a/lib/_emerge/create_world_atom.py b/lib/_emerge/create_world_atom.py
18 index c5e1f58be..277bd0777 100644
19 --- a/lib/_emerge/create_world_atom.py
20 +++ b/lib/_emerge/create_world_atom.py
21 @@ -1,4 +1,4 @@
22 -# Copyright 1999-2012 Gentoo Foundation
23 +# Copyright 1999-2020 Gentoo Authors
24 # Distributed under the terms of the GNU General Public License v2
25
26 import sys
27 @@ -15,8 +15,8 @@ def create_world_atom(pkg, args_set, root_config, before_install=False):
28 """Create a new atom for the world file if one does not exist. If the
29 argument atom is precise enough to identify a specific slot then a slot
30 atom will be returned. Atoms that are in the system set may also be stored
31 - in world since system atoms can only match one slot while world atoms can
32 - be greedy with respect to slots. Unslotted system packages will not be
33 + in world since a user might want to select muliple slots of a slotted
34 + package like gcc for example. Unslotted system packages will not be
35 stored in world."""
36
37 arg_atom = args_set.findAtomForPackage(pkg)
38 @@ -111,8 +111,9 @@ def create_world_atom(pkg, args_set, root_config, before_install=False):
39 # Both atoms would be identical, so there's nothing to add.
40 return None
41 if not slotted and not arg_atom.repo:
42 - # Unlike world atoms, system atoms are not greedy for slots, so they
43 - # can't be safely excluded from world if they are slotted.
44 + # Don't exclude slotted atoms for system packages from world, since
45 + # a user might want to select muliple slots of a slotted package like
46 + # gcc for example.
47 system_atom = sets["system"].findAtomForPackage(pkg)
48 if system_atom:
49 if not system_atom.cp.startswith("virtual/"):