Skip to content

Commit

Permalink
spec: only add additional sandbox mounts from same package
Browse files Browse the repository at this point in the history
If a package is built in the sandbox it is defined that all previous
steps of the package are available in the sandbox. The code that added
these extra dependencies for the sandbox relied on the fact that
checkout steps have no dependencies. With the introduction of the
checkoutDep flag this is no longer the case. It is thus required to stop
iterating steps once we reached the checkout step.

Fixes #479.
  • Loading branch information
jkloetzke committed Jul 14, 2022
1 parent d91b848 commit b058ac5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pym/bob/languages.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,9 +662,13 @@ def fromStep(cls, step, envFile=None, envWhiteList=[], logFile=None, isJenkins=F
],
}

# special handling to mount all previous steps of current package
# Special handling to mount all previous steps of current package.
# It is defined that the checkout and build step are visible in the
# sandbox for a given package step. We must stop at checkout steps
# because they might have dependencies due to the 'checkoutDep'
# flag.
extra = step
while extra.isValid() and len(extra.getArguments()) > 0:
while extra.isValid() and not extra.isCheckoutStep() and len(extra.getArguments()) > 0:
extra = extra.getArguments()[0]
if extra.isValid():
s['depMounts'].append((extra.getStoragePath(), extra.getExecPath(step)))
Expand Down

0 comments on commit b058ac5

Please sign in to comment.