Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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