Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! doc: document layers-scm
Browse files Browse the repository at this point in the history
  • Loading branch information
rhubert committed Sep 3, 2024
1 parent bf1d99b commit 7238f6f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pym/bob/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
from .tty import DEBUG, EXECUTED, INFO, NORMAL, IMPORTANT, SKIPPED, WARNING, log

class LayerStepSpec:
def __init__(self, path):
def __init__(self, path, whitelist):
self.__path = path
self.__whitelist = whitelist

@property
def workspaceWorkspacePath(self):
Expand All @@ -24,7 +25,7 @@ def env(self):

@property
def envWhiteList(self):
return []
return self.__whitelist

class Layer:
def __init__(self, name, root, recipes, yamlCache, defines, attic, scm=None):
Expand All @@ -44,7 +45,7 @@ async def __checkoutTask(self, verbose):
return

Check warning on line 45 in pym/bob/layers.py

View check run for this annotation

Codecov / codecov/patch

pym/bob/layers.py#L45

Added line #L45 was not covered by tests
dir = self.__scm.getProperties(False).get("dir")

invoker = Invoker(spec=LayerStepSpec(self.__layerDir),
invoker = Invoker(spec=LayerStepSpec(self.__layerDir, self.__recipes.envWhiteList()),
preserveEnv= False,
noLogFiles = True,
showStdOut = verbose > INFO,
Expand All @@ -56,8 +57,6 @@ async def __checkoutTask(self, verbose):
newState["prop"] = {k:v for k,v in self.__scm.getProperties(False).items() if v is not None}

oldState = BobState().getLayerState(self.__layerDir)
print(oldState)
print(self.__layerDir)

if os.path.exists(self.__layerDir) and oldState is None:
raise BuildError(f"New layer checkout '{self.getName()}' collides with existing layer '{self.__layerDir}'!")
Expand Down

0 comments on commit 7238f6f

Please sign in to comment.