Skip to content

Commit

Permalink
[antlir2][package] inherit systemd configuration
Browse files Browse the repository at this point in the history
Summary:
Packages should inherit the systemd setting from however they are being brought
into the build, just like how the OS is inherited.

Reviewed By: naveedgol

Differential Revision: D65155951

fbshipit-source-id: ed0956c2dcdcf12d080447b4d50c3b08b939fddf
  • Loading branch information
vmagro authored and facebook-github-bot committed Oct 30, 2024
1 parent 6b5f0ac commit 78b27a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion antlir/antlir2/bzl/package/cfg.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def _package_cfg_impl(platform: PlatformInfo, refs: struct, attrs: struct) -> Pl
constraints = constraints,
refs = refs,
attrs = attrs,
overwrite = True,
)

if is_facebook:
Expand Down
7 changes: 6 additions & 1 deletion antlir/antlir2/cfg/systemd/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

def _transition(*, constraints, refs: struct, attrs: struct, overwrite: bool):
def _transition(
*,
constraints,
refs: struct,
attrs: struct,
overwrite: bool = False):
setting = refs.systemd_setting[ConstraintSettingInfo]
if attrs.systemd and (
(setting.label not in constraints) or
Expand Down

0 comments on commit 78b27a2

Please sign in to comment.