Don't find pkgsrc bash. It won't be in the sandbox. #29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This isn't mergeable as is, so don't worry that I don't have a signed contributor agreement. :-) But it's probably close enough for you to commit something that solves the problem.
The problem: on a platform where
/bin/shdoesn't suffice for pkgsrc bootstrap andpkg_comptries to find abash, it's possible-to-likely that the host system has all of these properties:pkgtools/pkg_compinstalled)$PATH, so that pkgsrc tools are found before system-provided onesshells/bashhas been installedIn such cases,
pkg_compcurrently detects and chooses e.g./usr/pkg/bin/bashas${bootstrap_sh}. At some point early in the bootstrap, some build or other fails (one of thelibnbcompatI think) because it's trying to run/usr/pkg/bin/bash, which is not available in the sandbox.My change is a portion of what I'll commit to pkgsrc shortly (unless you recommend I don't): it removes pkgsrc paths from the
$PATHthat's in effect forwhich bash, so only a non-pkgsrcbashwill be found. I've tested that this (in conjunction with the obviousSUBST) fixes the bootstrap on such platforms.