Skip to content

Commit

Permalink
cnf: sets: Migrate @golang-rebuild to dev-lang/go
Browse files Browse the repository at this point in the history
Bug: https://bugs.gentoo.org/919751
Signed-off-by: Zac Medico <zmedico@gentoo.org>
  • Loading branch information
zmedico committed Feb 25, 2024
1 parent 8832264 commit 57a58d9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
6 changes: 0 additions & 6 deletions cnf/sets/portage.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 9 additions & 1 deletion lib/portage/tests/resolver/ResolverPlayground.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
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
Expand Down Expand Up @@ -747,6 +747,14 @@ def run(self, atoms, options={}, action=None):
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,
Expand Down
8 changes: 6 additions & 2 deletions lib/portage/tests/sets/base/test_variable_set.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -10,6 +10,10 @@

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": {
Expand All @@ -21,7 +25,7 @@ def testVariableSetEmerge(self):

test_cases = (
ResolverPlaygroundTestCase(
["@golang-rebuild"],
[f"@golang-rebuild{golang_rebuild}"],
mergelist=["dev-go/go-pkg-1"],
success=True,
),
Expand Down

0 comments on commit 57a58d9

Please sign in to comment.