Skip to content

Commit 5cf272b

Browse files
committed
Move image driver init until after creation of brickstrap.conf
When doing a full build in one step (`all` command), environment variables in `config` were not yet included. This was causing ev3dev-jessie image sizes to be 4GB instead of 2GB. Issue ev3dev/ev3dev#701
1 parent a872660 commit 5cf272b

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

brickstrap.sh

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,20 @@ function brp_init_env()
342342

343343
# brickstrap.conf may not exist yet if this is the first command
344344
if [ -f $(brp_brickstrap_conf) ]; then
345-
. $(brp_brickstrap_conf)
345+
brp_init_env2
346346
fi
347+
347348
brp_import_extra_components
349+
}
350+
351+
#
352+
# Finish setting up environment.
353+
#
354+
# This must be called after brickstrap.conf is created!
355+
#
356+
function brp_init_env2()
357+
{
358+
. $(brp_brickstrap_conf)
348359

349360
# source custom-image.sh driver scripts
350361
if br_list_paths custom-image.sh -r >/dev/null; then
@@ -404,8 +415,8 @@ function brp_create_conf() {
404415
echo "BR_PROJECT=${BR_PROJECT}" >> $(brp_brickstrap_conf)
405416
echo "BR_COMPONENTS=${BR_COMPONENTS}" >> $(brp_brickstrap_conf)
406417

407-
# loading now since it was not available in brp_init_env()
408-
. $(brp_brickstrap_conf)
418+
# Finish environment init now that we have brickstrap.conf
419+
brp_init_env2
409420

410421
info "Creating multistrap configuration file..."
411422
if br_list_directories packages >/dev/null; then

0 commit comments

Comments
 (0)