Imagebuilder does not respect command line variable override
Username: Luiz Angelo Daros de Luca
Origin: https://bugs.openwrt.org/index.php?do=details&task_id=1823
When building with Imagebuilder, make seems to not pass variable overide from command line to nested make in subshells:
make image CONFIG_TARGET_ROOTFS_PARTSIZE=128
The problem seems to be here:
Makefile:
(...)
image:
$(MAKE) -s _check_profile
(unset PROFILE FILES PACKAGES MAKEFLAGS;
$(MAKE) -s _call_image
$(if (PROFILE),USER_PROFILE="
(PROFILE_FILTER)")
$(if (FILES),USER_FILES="
(FILES)")
$(if (PACKAGES),USER_PACKAGES="
(PACKAGES)")
$(if (BIN_DIR),BIN_DIR="
(BIN_DIR)"))
If I either remove the subshell ‘(’ ‘)’ or add ‘-e’ to $(MAKE), it will work.
However, the subshell is there for a reason. Also ‘-e’ can introduce other problems
when env variables from parent process are polluted.
I’m doing a hack using:
make image CONFIG_TARGET_ROOTFS_PARTSIZE=128 MAKE="make -e"
But I guess this is not a permanent solution.