public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:master commit in: lib/portage/tests/resolver/, cnf/sets/, lib/portage/tests/sets/base/
@ 2024-02-27  2:27 Zac Medico
  0 siblings, 0 replies; only message in thread
From: Zac Medico @ 2024-02-27  2:27 UTC (permalink / raw
  To: gentoo-commits

commit:     1d3e3843f2a51c581d344540c5c6ee266afa30d2
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 25 22:57:43 2024 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Feb 26 23:17:55 2024 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=1d3e3843

cnf: sets: Migrate @golang-rebuild to dev-lang/go

Bug: https://bugs.gentoo.org/919751
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 cnf/sets/portage.conf                            |  6 ------
 lib/portage/tests/resolver/ResolverPlayground.py | 10 +++++++++-
 lib/portage/tests/sets/base/test_variable_set.py |  8 ++++++--
 3 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/cnf/sets/portage.conf b/cnf/sets/portage.conf
index 2e02f91f97..c272f98db1 100644
--- a/cnf/sets/portage.conf
+++ b/cnf/sets/portage.conf
@@ -110,12 +110,6 @@ class = portage.sets.dbapi.UnavailableBinaries
 [changed-deps]
 class = portage.sets.dbapi.ChangedDepsSet
 
-# Installed packages for which vdb *DEPEND includes dev-lang/go.
-[golang-rebuild]
-class = portage.sets.dbapi.VariableSet
-variable = BDEPEND
-includes = dev-lang/go
-
 # Installed packages for which vdb *DEPEND includes virtual/rust
 [rust-rebuild]
 class = portage.sets.dbapi.VariableSet

diff --git a/lib/portage/tests/resolver/ResolverPlayground.py b/lib/portage/tests/resolver/ResolverPlayground.py
index 75c86b615c..c0455415a1 100644
--- a/lib/portage/tests/resolver/ResolverPlayground.py
+++ b/lib/portage/tests/resolver/ResolverPlayground.py
@@ -28,7 +28,7 @@ from portage.exception import InvalidBinaryPackageFormat
 from portage.gpg import GPG
 
 import _emerge
-from _emerge.actions import _calc_depclean
+from _emerge.actions import _calc_depclean, expand_set_arguments
 from _emerge.Blocker import Blocker
 from _emerge.create_depgraph_params import create_depgraph_params
 from _emerge.DependencyArg import DependencyArg
@@ -747,6 +747,14 @@ class ResolverPlayground:
                 self.settings, self.trees, options, params, None
             )
 
+            atoms, retval = expand_set_arguments(
+                atoms, action, self.trees[self.eroot]["root_config"]
+            )
+            if retval != os.EX_OK:
+                raise AssertionError(
+                    f"expand_set_arguments failed with retval {retval}"
+                )
+
             if params_action == "remove":
                 depclean_result = _calc_depclean(
                     self.settings,

diff --git a/lib/portage/tests/sets/base/test_variable_set.py b/lib/portage/tests/sets/base/test_variable_set.py
index 9e90ee6dd7..60c43a5b83 100644
--- a/lib/portage/tests/sets/base/test_variable_set.py
+++ b/lib/portage/tests/sets/base/test_variable_set.py
@@ -1,4 +1,4 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 from portage.tests import TestCase
@@ -10,6 +10,10 @@ from portage.tests.resolver.ResolverPlayground import (
 
 class VariableSetTestCase(TestCase):
     def testVariableSetEmerge(self):
+
+        # Using local set definition because @golang-rebuild migrated to dev-lang/go since bug 919751.
+        golang_rebuild = "{class=portage.sets.dbapi.VariableSet,variable=BDEPEND,includes=dev-lang/go}"
+
         ebuilds = {
             "dev-go/go-pkg-1": {"BDEPEND": "dev-lang/go"},
             "www-client/firefox-1": {
@@ -21,7 +25,7 @@ class VariableSetTestCase(TestCase):
 
         test_cases = (
             ResolverPlaygroundTestCase(
-                ["@golang-rebuild"],
+                [f"@golang-rebuild{golang_rebuild}"],
                 mergelist=["dev-go/go-pkg-1"],
                 success=True,
             ),


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-27  2:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-27  2:27 [gentoo-commits] proj/portage:master commit in: lib/portage/tests/resolver/, cnf/sets/, lib/portage/tests/sets/base/ Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox