main, metadata, lists: switch to groups2lists()

Now that we don't ignore X-Alterator-PackageList
in pkggroup files these few places referencing
group names as list names have broke; bring 'em
in line through this new and shiny function.
This commit is contained in:
Michael Shigorin 2016-04-07 17:06:33 +03:00
parent cbbc23edfb
commit 137e738cf7
3 changed files with 12 additions and 11 deletions

View File

@ -34,11 +34,13 @@ metadata-.base:
} | sed -re '/^[^[:space:]#]/ s/[[:space:]]+/\n/g' > .base
# see also alterator-pkg (backend3/pkg-install);
# we only tar up what's up to it
# we only tar up what's up to it (note that e.g.
# LIVE_LISTS are needed in the generated profile
# but not for alterator-pkg)
metadata: metadata-.base
@mkdir -p $(METADIR); \
tar -C $(PKGDIR) -cvf - \
$(call rlist,$(THE_GROUPS) $(MAIN_GROUPS) .base) \
$(call rlist,.base $(call groups2lists)) \
$(call rgroup,$(THE_GROUPS) $(MAIN_GROUPS)) \
$(call rprofile,$(PKG_PROFILES)) \
> $(METADIR)/pkg-groups.tar

View File

@ -15,6 +15,8 @@ pkgdups:
else
include $(BUILDDIR)/distcfg.mk
include $(BUILDDIR)/functions.mk
SUFFIX := pkg/lists
TARGET := $(BUILDDIR)/$(SUFFIX)
@ -28,15 +30,14 @@ copy-lists:
$(if $(filter environment% file,$(origin $V)),$($V))) \
| xargs -r -- cp --parents -at $(TARGET) --
copy-groups: PKGDIR = ..
copy-groups:
@if [ -n "$(THE_GROUPS)$(MAIN_GROUPS)" ]; then \
cp --parents -at $(TARGET) -- $(THE_GROUPS) $(MAIN_GROUPS); \
fi
@echo $(call groups2lists) \
| xargs -r -- cp --parents -at $(TARGET) --
grep-archdep: a = $(ARCH)
grep-archdep: s = [:space:]
grep-archdep:
# xargs -L 1024 -n 1024 ? -- breaks -I
@# xargs -L 1024 -n 1024 ? -- breaks -I
@find $(TARGET) -type f \
| xargs -I '__' sh -c '\
sed -rni "s/\\<([^@ ]*)\\>|\\<([^@ ]*)@$a\\>/\\1\\2/pg" __; \

View File

@ -22,10 +22,8 @@ IMAGE_PACKAGES_REGEXP = $(THE_PACKAGES_REGEXP) \
$(BASE_KMODULES_REGEXP) \
$(MAIN_KMODULES))
IMAGE_PACKAGES = $(call map,list, \
$(THE_LISTS) $(THE_GROUPS) \
$(BASE_LISTS) \
$(MAIN_LISTS) $(MAIN_GROUPS)) \
IMAGE_PACKAGES = $(call map,list,$(THE_LISTS) $(BASE_LISTS) $(MAIN_LISTS) \
$(call groups2lists)) \
$(SYSTEM_PACKAGES) $(COMMON_PACKAGES) \
$(THE_PACKAGES) $(BASE_PACKAGES) $(MAIN_PACKAGES)