Commit 137e738c authored by Michael Shigorin's avatar Michael Shigorin

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.
parent cbbc23ed
...@@ -34,11 +34,13 @@ metadata-.base: ...@@ -34,11 +34,13 @@ metadata-.base:
} | sed -re '/^[^[:space:]#]/ s/[[:space:]]+/\n/g' > .base } | sed -re '/^[^[:space:]#]/ s/[[:space:]]+/\n/g' > .base
# see also alterator-pkg (backend3/pkg-install); # 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 metadata: metadata-.base
@mkdir -p $(METADIR); \ @mkdir -p $(METADIR); \
tar -C $(PKGDIR) -cvf - \ tar -C $(PKGDIR) -cvf - \
$(call rlist,$(THE_GROUPS) $(MAIN_GROUPS) .base) \ $(call rlist,.base $(call groups2lists)) \
$(call rgroup,$(THE_GROUPS) $(MAIN_GROUPS)) \ $(call rgroup,$(THE_GROUPS) $(MAIN_GROUPS)) \
$(call rprofile,$(PKG_PROFILES)) \ $(call rprofile,$(PKG_PROFILES)) \
> $(METADIR)/pkg-groups.tar > $(METADIR)/pkg-groups.tar
...@@ -15,6 +15,8 @@ pkgdups: ...@@ -15,6 +15,8 @@ pkgdups:
else else
include $(BUILDDIR)/distcfg.mk include $(BUILDDIR)/distcfg.mk
include $(BUILDDIR)/functions.mk
SUFFIX := pkg/lists SUFFIX := pkg/lists
TARGET := $(BUILDDIR)/$(SUFFIX) TARGET := $(BUILDDIR)/$(SUFFIX)
...@@ -28,15 +30,14 @@ copy-lists: ...@@ -28,15 +30,14 @@ copy-lists:
$(if $(filter environment% file,$(origin $V)),$($V))) \ $(if $(filter environment% file,$(origin $V)),$($V))) \
| xargs -r -- cp --parents -at $(TARGET) -- | xargs -r -- cp --parents -at $(TARGET) --
copy-groups: PKGDIR = ..
copy-groups: copy-groups:
@if [ -n "$(THE_GROUPS)$(MAIN_GROUPS)" ]; then \ @echo $(call groups2lists) \
cp --parents -at $(TARGET) -- $(THE_GROUPS) $(MAIN_GROUPS); \ | xargs -r -- cp --parents -at $(TARGET) --
fi
grep-archdep: a = $(ARCH) grep-archdep: a = $(ARCH)
grep-archdep: s = [:space:]
grep-archdep: grep-archdep:
# xargs -L 1024 -n 1024 ? -- breaks -I @# xargs -L 1024 -n 1024 ? -- breaks -I
@find $(TARGET) -type f \ @find $(TARGET) -type f \
| xargs -I '__' sh -c '\ | xargs -I '__' sh -c '\
sed -rni "s/\\<([^@ ]*)\\>|\\<([^@ ]*)@$a\\>/\\1\\2/pg" __; \ sed -rni "s/\\<([^@ ]*)\\>|\\<([^@ ]*)@$a\\>/\\1\\2/pg" __; \
......
...@@ -22,10 +22,8 @@ IMAGE_PACKAGES_REGEXP = $(THE_PACKAGES_REGEXP) \ ...@@ -22,10 +22,8 @@ IMAGE_PACKAGES_REGEXP = $(THE_PACKAGES_REGEXP) \
$(BASE_KMODULES_REGEXP) \ $(BASE_KMODULES_REGEXP) \
$(MAIN_KMODULES)) $(MAIN_KMODULES))
IMAGE_PACKAGES = $(call map,list, \ IMAGE_PACKAGES = $(call map,list,$(THE_LISTS) $(BASE_LISTS) $(MAIN_LISTS) \
$(THE_LISTS) $(THE_GROUPS) \ $(call groups2lists)) \
$(BASE_LISTS) \
$(MAIN_LISTS) $(MAIN_GROUPS)) \
$(SYSTEM_PACKAGES) $(COMMON_PACKAGES) \ $(SYSTEM_PACKAGES) $(COMMON_PACKAGES) \
$(THE_PACKAGES) $(BASE_PACKAGES) $(MAIN_PACKAGES) $(THE_PACKAGES) $(BASE_PACKAGES) $(MAIN_PACKAGES)
......
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