Skip to content

Commit 06fe616

Browse files
committed
Revert "Address review comment"
The review comment was based on the incorrect assumption that no dep declares ship_source_offer. In fact, freetds, openscap, attr, acl, libsepol, systemd, gpg-error and gcrypt do — but none of them are in the Windows dep graph. On Windows, offers_dir is therefore always empty. rules_python 1.9.0 makes `bazel run` copy runfiles to a fresh temp dir and skips empty dirs, causing pkg_install to fail with FileNotFoundError. The select() correctly excluded the offers directory on Windows to avoid this. This reverts commit bc7bb876b618341b1749cf6a38eec2d95d91a8a3.
1 parent 2c3e594 commit 06fe616

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

compliance/package_licenses.bzl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,14 @@ def package_licenses(name = None, src = None):
6464
name = name,
6565
srcs = [
6666
":%s_license_dir_stripped_" % name,
67-
# ship_source_offer is not declared by any dep, so offers_dir is always empty. rules_python 1.9.0 makes
68-
# `bazel run` on Windows copy runfiles to a fresh temp dir; Bazel skips empty dirs in that copy, causing
69-
# pkg_install to fail with FileNotFoundError (Linux/macOS use symlinks, so empty trees are fine).
70-
#":%s_offer_dir_stripped_" % name, #TODO(agent-build): uncomment when ship_source_offer is actually used
71-
],
67+
] + select({
68+
# None of the deps that declare ship_source_offer (freetds, openscap, attr, etc.) are included in the
69+
# Windows build; offers_dir is therefore always empty there. rules_python 1.9.0 makes `bazel run` copy
70+
# runfiles to a fresh temp dir and skips empty dirs, causing pkg_install to fail with FileNotFoundError
71+
# (Linux/macOS use symlinks so empty TreeArtifacts are fine); remove this select when Windows does.
72+
"@platforms//os:windows": [], #TODO(agent-build): remove `select` when Windows deps use ship_source_offer
73+
"//conditions:default": [":%s_offer_dir_stripped_" % name],
74+
}),
7275
visibility = ["//visibility:public"],
7376
)
7477

0 commit comments

Comments
 (0)