Commit b21353a0 authored by Michael Shigorin's avatar Michael Shigorin

complex subprofile delimiter changed ("/" -> "@")

That sub/stage2/install2 was somewhat clumsy actually as it looked like a hierarchical thing while being a substitution thing: generic stage2 would get put in place renamed as install2. This could only get worse with hierarchical features which have already been both requested and considered for quite a time, and "stage2 at install2" reads much more naturally.
parent 912dbcfd
...@@ -69,14 +69,14 @@ $(FEATURES): ...@@ -69,14 +69,14 @@ $(FEATURES):
srcdirs="."; \ srcdirs="."; \
dst="."; \ dst="."; \
else \ else \
src="$${sub%/*}"; \ src="$${sub%@*}"; \
dst="$${sub#*/}"; \ dst="$${sub#*@}"; \
srcdirs=; \ srcdirs=; \
if [ -d "$$src" ]; then \ if [ -d "$$src" ]; then \
srcdirs="$$src"; \ srcdirs="$$src"; \
fi; \ fi; \
if [ -d "$$dst" -a "$$dst" != "$$src" ]; then \ if [ -d "$$dst" -a "$$dst" != "$$src" ]; then \
srcdirs="$$srcdirs $$dst"; \ srcdirs="$${srcdirs:+$$srcdirs }$$dst"; \
fi; \ fi; \
for srcdir in $$srcdirs; do \ for srcdir in $$srcdirs; do \
rsync -qab --exclude tagged \ rsync -qab --exclude tagged \
......
# step 4: build the distribution image # step 4: build the distribution image
# for complex-specified subprofiles like stage2/live, # take the latter part for complex-specified subprofiles like stage2@live
# take the latter part SUBDIRS = $(SUBPROFILE_DIRS)
SUBDIRS = $(notdir $(SUBPROFILES))
# proxy over the ISO metadata collected; see also genisoimagerc(5) # proxy over the ISO metadata collected; see also genisoimagerc(5)
BOOT_SYSI := $(META_SYSTEM_ID) BOOT_SYSI := $(META_SYSTEM_ID)
......
# alterator-based installer, second (livecd) stage # alterator-based installer, second (livecd) stage
use/install2: use/stage2 sub/stage2/install2 use/metadata use/cleanup/installer use/install2: use/stage2 sub/stage2@install2 use/metadata use/cleanup/installer
@$(call add_feature) @$(call add_feature)
@$(call set,INSTALL2_PACKAGES,installer-distro-$$(INSTALLER)-stage2) @$(call set,INSTALL2_PACKAGES,installer-distro-$$(INSTALLER)-stage2)
@$(call add,INSTALL2_PACKAGES,branding-$$(BRANDING)-alterator) @$(call add,INSTALL2_PACKAGES,branding-$$(BRANDING)-alterator)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# copy stage2 as live # copy stage2 as live
# NB: starts to preconfigure but doesn't use/cleanup yet # NB: starts to preconfigure but doesn't use/cleanup yet
use/live: use/stage2 sub/stage2/live use/live: use/stage2 sub/stage2@live
@$(call add_feature) @$(call add_feature)
@$(call add,CLEANUP_PACKAGES,'installer*') @$(call add,CLEANUP_PACKAGES,'installer*')
......
use/rescue: use/stage2 sub/stage2/rescue use/syslinux/sdab.cfg use/rescue: use/stage2 sub/stage2@rescue use/syslinux/sdab.cfg
@$(call add_feature) @$(call add_feature)
@$(call add,RESCUE_LISTS, openssh \ @$(call add,RESCUE_LISTS, openssh \
$(call tags,(base || extra) && (rescue || network))) $(call tags,(base || extra) && (rescue || network)))
...@@ -22,9 +22,9 @@ SYSLINUX_UI := none ...@@ -22,9 +22,9 @@ SYSLINUX_UI := none
endif endif
# SUBPROFILES are considered SYSLINUX_CFG too # SUBPROFILES are considered SYSLINUX_CFG too
# (note these can appear like stage2/live); # (note these can appear like stage2@live);
# 01defaults.cfg is included indefinitely # 01defaults.cfg is included indefinitely
SYSLINUX_CFG := $(SYSLINUX_CFG) $(notdir $(SUBPROFILES)) defaults SYSLINUX_CFG := $(SYSLINUX_CFG) $(SUBPROFILE_DIRS) defaults
DSTDIR := $(BUILDDIR)/stage1/files/syslinux/.in DSTDIR := $(BUILDDIR)/stage1/files/syslinux/.in
......
...@@ -88,7 +88,9 @@ profile/bare: profile/init ...@@ -88,7 +88,9 @@ profile/bare: profile/init
@$(call set,IMAGE_INIT_LIST,+branding-$$(BRANDING)-release) @$(call set,IMAGE_INIT_LIST,+branding-$$(BRANDING)-release)
@mp-commit "$(BUILDDIR)" "image configuration defaults set" @mp-commit "$(BUILDDIR)" "image configuration defaults set"
# put the derived SUBPROFILE_DIRS here to get it logged in clear text by the way
profile/finalize: profile/finalize:
@$(call put,SUBPROFILE_DIRS = $$(notdir $$(subst @,/,$$(SUBPROFILES))))
@if [ -s $(RC) ]; then $(call put,-include $(RC)); fi @if [ -s $(RC) ]; then $(call put,-include $(RC)); fi
@$(call put,endif) @$(call put,endif)
@mp-commit "$(BUILDDIR)" "image configuration finalized" @mp-commit "$(BUILDDIR)" "image configuration finalized"
......
...@@ -10,8 +10,8 @@ include $(BUILDDIR)/distcfg.mk ...@@ -10,8 +10,8 @@ include $(BUILDDIR)/distcfg.mk
# take src/ and put it as dst/ (for stage2 variants) # take src/ and put it as dst/ (for stage2 variants)
all: all:
@for sub in $(SUBPROFILES); do \ @for sub in $(SUBPROFILES); do \
src="$${sub%/*}" && \ src="$${sub%@*}" && \
dst="$${sub#*/}" && \ dst="$${sub#*@}" && \
neq="$${src#$$dst}" && \ neq="$${src#$$dst}" && \
rsync -qa "$$src/" "$(BUILDDIR)/$$dst/" && \ rsync -qa "$$src/" "$(BUILDDIR)/$$dst/" && \
mp-commit "$(BUILDDIR)/$$dst/" \ mp-commit "$(BUILDDIR)/$$dst/" \
...@@ -20,7 +20,7 @@ all: ...@@ -20,7 +20,7 @@ all:
clean: clean:
@for sub in $(SUBPROFILES); do \ @for sub in $(SUBPROFILES); do \
dst="${sub#*/}" && \ dst="${sub#*@}" && \
if [ -n "$$dst" -a -n "$(BUILDDIR)" ]; then \ if [ -n "$$dst" -a -n "$(BUILDDIR)" ]; then \
rm -r "$(BUILDDIR)/$$dst" && \ rm -r "$(BUILDDIR)/$$dst" && \
mkdir -p "$(BUILDDIR)/$$dst"; \ mkdir -p "$(BUILDDIR)/$$dst"; \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment