projects-dir.mk: reinstall with --source-profile=replace

--source-profile=replace should be passed to all

    jw-pkg.py projects build pkg-*install

invocations. Those invocations typically happen in the context of
pkg-%install, so add that target, specializing the pkg-% target.

The problem this solves is that /etc/profile is currently read only
once before bootstrapping all software on a pristine system is
started. This might lead to the situation that package A has
installed environment variable definitions into /etc/profile.d,
package B needs them for building, but never gets to read them.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-02-18 14:30:50 +01:00
commit 3ad021f071

View file

@ -260,6 +260,9 @@ pkg-release-all:
pkg-init-%: pkg-init-%:
$(CREATE_PROJECT_SH) $* $(CREATE_PROJECT_SH) $*
pkg-%install: $(filter-out $(UNAVAILABLE_TARGETS),pull.done)
$(JW_PKG_PY_BUILD) --source-profile=replace $@ $(TARGET_PROJECTS)
pkg-%: $(filter-out $(UNAVAILABLE_TARGETS),pull.done) pkg-%: $(filter-out $(UNAVAILABLE_TARGETS),pull.done)
$(JW_PKG_PY_BUILD) $@ $(TARGET_PROJECTS) $(JW_PKG_PY_BUILD) $@ $(TARGET_PROJECTS)