Skip to content

Commit

Permalink
Revert D60253684
Browse files Browse the repository at this point in the history
Summary:
This diff reverts D60253684
Breaking some continuous builds of bare targets for targets that depend on layers but don't have `uses_sudo`
P1515542209

Test Plan: NA

Reviewed By: vmagro

Differential Revision: D60827664

fbshipit-source-id: 1d197d41fa75e3ab9be5247a081605104befdb03
  • Loading branch information
Dark Knight authored and facebook-github-bot committed Aug 6, 2024
1 parent e3c8434 commit a44b5c9
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions antlir/antlir2/bzl/image/layer.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ load("@prelude//utils:expect.bzl", "expect")
load("@prelude//utils:selects.bzl", "selects")
load("//antlir/antlir2/antlir2_error_handler:handler.bzl", "antlir2_error_handler")
load("//antlir/antlir2/antlir2_overlayfs:overlayfs.bzl", "OverlayFs", "OverlayLayer", "get_antlir2_use_overlayfs")
load("//antlir/antlir2/antlir2_rootless:package.bzl", "get_antlir2_rootless")
load("//antlir/antlir2/bzl:build_phase.bzl", "BuildPhase", "verify_build_phases")
load("//antlir/antlir2/bzl:platform.bzl", "arch_select")
load("//antlir/antlir2/bzl:types.bzl", "BuildApplianceInfo", "FeatureInfo", "FlavorInfo", "LayerContents", "LayerInfo")
Expand Down Expand Up @@ -695,16 +696,8 @@ def layer(

kwargs["default_target_platform"] = config.get_platform_for_current_buildfile().target_platform

# If the user didn't configure the rootless setting, default to True
# NOTE: this only affects builds that `buck2 build` the layer directly, it
# does *NOT* affect builds that use this layer as a dependency (packages,
# container tests, vm tests).
#
# Why does it matter then?
# Automated bisect services will `buck2 build` layer targets directly when
# they are broken, and that does not support `sudo`.
if rootless == None:
rootless = True
rootless = get_antlir2_rootless()

if get_antlir2_use_overlayfs():
kwargs["working_format"] = "overlayfs"
Expand Down

0 comments on commit a44b5c9

Please sign in to comment.