Skip to content

Commit 177b58c

Browse files
committed
Fix the default build script used by "build <package name>"
Before the simplify refactor, the convention was to name the first or default build script "<package name>.sh". The refactor changed this default to "pass1.sh", with "pass2.sh" and so on used for subsequent passes. This wasn't an issue when building usig scripts generated by script-generator (which explicitly declares the build script to use), but broke running "build <package name>" without an explicit script name from the post-bootstrap bash prompt. By deriving the script name from the current revision/pass number, this commit restores that functionality. An unfortunate blemish is that we number build scripts from 1, but repo tarballs from 0 - it would be nice to standardize on a single indexing convention.
1 parent 51dd19a commit 177b58c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

steps/helpers.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,12 @@ bin_preseed() {
113113
# that can be overridden on per package basis in the build script.
114114
# build takes two arguments:
115115
# 1) name-version of the package
116-
# 2) optionally specify build script. Default is name-version.sh
116+
# 2) optionally specify build script. Default is pass$((revision+1)).sh
117117
# 3) optionally specify directory to cd into
118118
build() {
119119
pkg=$1
120-
script_name=${2:-${pkg}.sh}
120+
get_revision "${pkg}"
121+
script_name=${2:-pass$((revision+1)).sh}
121122
dirname=${3:-${pkg}}
122123

123124
# shellcheck disable=SC2015
@@ -176,7 +177,6 @@ build() {
176177
call $build_stage
177178

178179
echo "${pkg}: creating package."
179-
get_revision "${pkg}"
180180
cd "${DESTDIR}"
181181
src_pkg
182182

0 commit comments

Comments
 (0)