Skip to content

Commit

Permalink
Merge pull request #588 from rhubert/rh-fix-layers
Browse files Browse the repository at this point in the history
layers: fix checkout of deleted layer
  • Loading branch information
jkloetzke authored Oct 4, 2024
2 parents 462954f + 0cc6ee5 commit ce2e547
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pym/bob/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,19 @@ async def __checkoutTask(self, verbose):
if os.path.exists(self.__layerDir) and oldState is None:
raise BuildError(f"New layer checkout '{self.getName()}' collides with existing layer '{self.__layerDir}'!")

created = False
if not os.path.isdir(self.__layerDir):
os.makedirs(self.__layerDir)
self.__created = True

if not created \
if not self.__created \
and self.__scm.isDeterministic() \
and oldState is not None \
and oldState["digest"] == newState["digest"]:
log("CHECKOUT: Layer " +
"'{}' skipped (up to date)".format(self.getName()), SKIPPED, INFO)
return

if not created and oldState is not None and \
if not self.__created and oldState is not None and \
newState["digest"] != oldState["digest"]:

canSwitch = self.__scm.canSwitch(getScm(oldState["prop"]))
Expand Down

0 comments on commit ce2e547

Please sign in to comment.