-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[antlir/metalos][oss] fixups to get metalos/bootloader evaluating
Summary: X-link: facebookincubator/metalos#10 We don't have any kernels in OSS yet, and even the internal code is a bit of a mess. This diff fixes up enough of the macro layer so that the BUCK file for `metalos/bootloader` at least evaluates. Test Plan: ``` ❯ arc skycastle run //tools/skycastle/workflows2/metalos/oss/metalos-oss-tests.sky:test_target_graph ``` https://www.internalfb.com/sandcastle/workflow/2675138178661370002 Reviewed By: epilatow Differential Revision: D59073165 fbshipit-source-id: 2df0aeb7b790dd96478612b9975415e4a1ef36fa
- Loading branch information
1 parent
49a29c6
commit 947e11f
Showing
8 changed files
with
41 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,7 +124,7 @@ def _enable_impl( | |
# systemctl enable [email protected] creates a | ||
# getty.target.wants/[email protected] link to [email protected]. | ||
name_prefix, suffix = paths.split_extension(unit) | ||
unit_name, sep, instance_name = name_prefix.rpartition("@") | ||
unit_name, sep, _instance_name = name_prefix.rpartition("@") | ||
link_target = unit_name + sep + suffix | ||
else: | ||
fail("unit contains too many @ characters: " + unit) | ||
|
@@ -398,11 +398,11 @@ def _mount_unit_file(name, mount): | |
return shape.render_template( | ||
name = name, | ||
instance = mount, | ||
template = "//antlir/bzl/linux/systemd:mount", | ||
template = "antlir//antlir/bzl/linux/systemd:mount", | ||
) | ||
|
||
def _skip_unit(unit, force = False): | ||
return _install_dropin("//antlir/bzl:99-skip-unit.conf", unit, force = force) | ||
return _install_dropin("antlir//antlir/bzl:99-skip-unit.conf", unit, force = force) | ||
|
||
def _unskip_unit(unit): | ||
return _remove_dropin(unit, "99-skip-unit.conf") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
def _get(kernel_or_alias, arch = "x86_64"): | ||
print("TODO: kernels.get({}, {})".format(kernel_or_alias, arch)) | ||
|
||
def _selection(name, query, oncall): | ||
print("TODO: kernels.selection({}, {}, {})".format(name, query, oncall)) | ||
|
||
kernels = struct( | ||
get = _get, | ||
select = struct( | ||
selection = _selection, | ||
), | ||
all_kernels = [], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters