commit:     7c6fda0e063ecc1f2411eaad20ea369dffd5bfe5
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Feb  3 20:10:01 2020 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Feb  3 20:29:16 2020 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=7c6fda0e

create_world_atom: fix outdated comments regarding greedy atoms

Fixes: 1342b456c460 ("Remove --update greedy SLOTs code from 
depgraph.select_files()")
Reported-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/_emerge/create_world_atom.py | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lib/_emerge/create_world_atom.py b/lib/_emerge/create_world_atom.py
index c5e1f58be..277bd0777 100644
--- a/lib/_emerge/create_world_atom.py
+++ b/lib/_emerge/create_world_atom.py
@@ -1,4 +1,4 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 import sys
@@ -15,8 +15,8 @@ def create_world_atom(pkg, args_set, root_config, 
before_install=False):
        """Create a new atom for the world file if one does not exist.  If the
        argument atom is precise enough to identify a specific slot then a slot
        atom will be returned. Atoms that are in the system set may also be 
stored
-       in world since system atoms can only match one slot while world atoms 
can
-       be greedy with respect to slots.  Unslotted system packages will not be
+       in world since a user might want to select muliple slots of a slotted
+       package like gcc for example. Unslotted system packages will not be
        stored in world."""
 
        arg_atom = args_set.findAtomForPackage(pkg)
@@ -111,8 +111,9 @@ def create_world_atom(pkg, args_set, root_config, 
before_install=False):
                # Both atoms would be identical, so there's nothing to add.
                return None
        if not slotted and not arg_atom.repo:
-               # Unlike world atoms, system atoms are not greedy for slots, so 
they
-               # can't be safely excluded from world if they are slotted.
+               # Don't exclude slotted atoms for system packages from world, 
since
+               # a user might want to select muliple slots of a slotted 
package like
+               # gcc for example.
                system_atom = sets["system"].findAtomForPackage(pkg)
                if system_atom:
                        if not system_atom.cp.startswith("virtual/"):

Reply via email to