Skip to content

Commit cc4b9c0

Browse files
authored
Fix mappings/external repo tests (#943)
* Fix mappings/external repo tests so that they work with bzlmod as of Bazel head * Fix stardoc generation
1 parent 5df7fb1 commit cc4b9c0

File tree

5 files changed

+61
-2
lines changed

5 files changed

+61
-2
lines changed

MODULE.bazel

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,10 @@ register_toolchains(
2323
"@rules_pkg_rpmbuild//:all",
2424
dev_dependency = True,
2525
)
26+
27+
local_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:local.bzl", "local_repository")
28+
29+
local_repository(
30+
name = "mappings_test_external_repo",
31+
path = "tests/mappings/external_repo",
32+
)

doc_build/BUILD

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ genrule(
6969
symbol_names = [
7070
rule,
7171
],
72-
deps = [":rules_pkg_lib"],
72+
deps = [
73+
":rules_pkg_lib",
74+
"//toolchains/rpm:standard_package",
75+
],
7376
)
7477
for rule, src in ORDER
7578
if src

pkg/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ starlark_library(
5656
srcs = [
5757
":standard_package",
5858
"//pkg:pkg.bzl",
59+
"//pkg:rpm_pfg.bzl",
5960
"//pkg/private:standard_package",
6061
"//pkg/private/deb:standard_package",
6162
"//pkg/private/tar:standard_package",
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Copyright 2025 The Bazel Authors. All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
module(
16+
name = "test_external_project",
17+
version = "0",
18+
compatibility_level = 0,
19+
)
20+
21+
local_path_override(
22+
module_name = "rules_pkg",
23+
path = "../../../",
24+
)
25+
26+
bazel_dep(name = "rules_license", version = "1.0.0")
27+
bazel_dep(name = "rules_python", version = "1.0.0")
28+
bazel_dep(name = "bazel_skylib", version = "1.7.1")
29+
30+
#########################################
31+
# Do not update to newer versions until you need a specific new feature.
32+
33+
# Only for development
34+
#bazel_dep(name = "platforms", version = "0.0.10", dev_dependency = True)
35+
#bazel_dep(name = "rules_cc", version = "0.0.17", dev_dependency = True)
36+
#bazel_dep(name = "stardoc", version = "0.7.2", dev_dependency = True)
37+
#
38+
## Find the system rpmbuild if one is available.
39+
#find_rpm = use_extension("//toolchains/rpm:rpmbuild_configure.bzl", "find_system_rpmbuild_bzlmod", dev_dependency = True)
40+
#use_repo(find_rpm, "rules_pkg_rpmbuild")
41+
#
42+
#register_toolchains(
43+
# "@rules_pkg_rpmbuild//:all",
44+
# dev_dependency = True,
45+
#)

toolchains/rpm/BUILD

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ filegroup(
3333
srcs = glob([
3434
"*",
3535
]),
36-
visibility = ["//distro:__pkg__"],
36+
visibility = [
37+
"//distro:__pkg__",
38+
"//doc_build:__pkg__",
39+
],
3740
)
3841

3942
exports_files(

0 commit comments

Comments
 (0)