include/feeds.mk: rework generation of opkg distfeeds.conf
Allow enabling/commenting/disabling each feed individually by using a tristate config symbol. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
This commit is contained in:
parent
6dac434c00
commit
16035a7dd3
@ -10,8 +10,6 @@
|
|||||||
|
|
||||||
FEEDS_INSTALLED:=$(notdir $(wildcard $(TOPDIR)/package/feeds/*))
|
FEEDS_INSTALLED:=$(notdir $(wildcard $(TOPDIR)/package/feeds/*))
|
||||||
FEEDS_AVAILABLE:=$(sort $(FEEDS_INSTALLED) $(shell $(SCRIPT_DIR)/feeds list -n))
|
FEEDS_AVAILABLE:=$(sort $(FEEDS_INSTALLED) $(shell $(SCRIPT_DIR)/feeds list -n))
|
||||||
FEEDS_ENABLED:=$(foreach feed,$(FEEDS_AVAILABLE),$(if $(CONFIG_FEED_$(feed)),$(feed)))
|
|
||||||
FEEDS_DISABLED:=$(filter-out $(FEEDS_ENABLED),$(FEEDS_AVAILABLE))
|
|
||||||
|
|
||||||
PACKAGE_SUBDIRS=$(PACKAGE_DIR)
|
PACKAGE_SUBDIRS=$(PACKAGE_DIR)
|
||||||
ifneq ($(CONFIG_PER_FEED_REPO),)
|
ifneq ($(CONFIG_PER_FEED_REPO),)
|
||||||
@ -35,10 +33,11 @@ endef
|
|||||||
# 1: destination file
|
# 1: destination file
|
||||||
define FeedSourcesAppend
|
define FeedSourcesAppend
|
||||||
( \
|
( \
|
||||||
echo "src/gz %d_core %U/targets/%S/packages"; \
|
echo 'src/gz %d_core %U/targets/%S/packages'; \
|
||||||
|
echo 'src/gz %d_base %U/packages/%A/base'; \
|
||||||
$(strip $(if $(CONFIG_PER_FEED_REPO), \
|
$(strip $(if $(CONFIG_PER_FEED_REPO), \
|
||||||
$(foreach feed,base $(FEEDS_ENABLED),echo "src/gz %d_$(feed) %U/packages/%A/$(feed)";) \
|
$(foreach feed,$(FEEDS_AVAILABLE), \
|
||||||
$(if $(CONFIG_PER_FEED_REPO_ADD_DISABLED), \
|
$(if $(CONFIG_FEED_$(feed)), \
|
||||||
$(foreach feed,$(FEEDS_DISABLED),echo "$(if $(CONFIG_PER_FEED_REPO_ADD_COMMENTED),# )src/gz %d_$(feed) %U/packages/%A/$(feed)";)))) \
|
echo '$(if $(filter m,$(CONFIG_FEED_$(feed))),# )src/gz %d_$(feed) %U/packages/%A/$(feed)';)))) \
|
||||||
) >> $(1)
|
) >> $(1)
|
||||||
endef
|
endef
|
||||||
|
@ -25,8 +25,6 @@ PKG_CONFIG_DEPENDS += \
|
|||||||
CONFIG_NAND_SUPPORT \
|
CONFIG_NAND_SUPPORT \
|
||||||
CONFIG_CLEAN_IPKG \
|
CONFIG_CLEAN_IPKG \
|
||||||
CONFIG_PER_FEED_REPO \
|
CONFIG_PER_FEED_REPO \
|
||||||
CONFIG_PER_FEED_REPO_ADD_DISABLED \
|
|
||||||
CONFIG_PER_FEED_REPO_ADD_COMMENTED \
|
|
||||||
$(foreach feed,$(FEEDS_AVAILABLE),CONFIG_FEED_$(feed))
|
$(foreach feed,$(FEEDS_AVAILABLE),CONFIG_FEED_$(feed))
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
@ -274,18 +274,4 @@ menuconfig PER_FEED_REPO
|
|||||||
If set, a separate repository is generated within bin/*/packages/
|
If set, a separate repository is generated within bin/*/packages/
|
||||||
for the core packages and each enabled feed.
|
for the core packages and each enabled feed.
|
||||||
|
|
||||||
config PER_FEED_REPO_ADD_DISABLED
|
|
||||||
bool "Add available but not enabled feeds to opkg.conf"
|
|
||||||
default y
|
|
||||||
depends on PER_FEED_REPO
|
|
||||||
help
|
|
||||||
Add not installed or disabled feeds from feeds.conf to opkg.conf.
|
|
||||||
|
|
||||||
config PER_FEED_REPO_ADD_COMMENTED
|
|
||||||
bool "Comment out not enabled feeds"
|
|
||||||
default !BUILDBOT
|
|
||||||
depends on PER_FEED_REPO && PER_FEED_REPO_ADD_DISABLED
|
|
||||||
help
|
|
||||||
Add not enabled feeds as commented out source lines to opkg.conf.
|
|
||||||
|
|
||||||
source "tmp/.config-feeds.in"
|
source "tmp/.config-feeds.in"
|
||||||
|
@ -824,11 +824,12 @@ sub feed_config() {
|
|||||||
my $installed = (-f "feeds/$feed->[1].index");
|
my $installed = (-f "feeds/$feed->[1].index");
|
||||||
|
|
||||||
printf "\tconfig FEED_%s\n", $feed->[1];
|
printf "\tconfig FEED_%s\n", $feed->[1];
|
||||||
printf "\t\tbool \"Enable feed %s\"\n", $feed->[1];
|
printf "\t\ttristate \"Enable feed %s\"\n", $feed->[1];
|
||||||
printf "\t\tdepends on PER_FEED_REPO\n";
|
printf "\t\tdepends on PER_FEED_REPO\n";
|
||||||
printf "\t\tdefault y\n" if $installed;
|
printf "\t\tdefault y\n" if $installed;
|
||||||
printf "\t\thelp\n";
|
printf "\t\thelp\n";
|
||||||
printf "\t\t Enable the \\\"%s\\\" feed at %s.\n", $feed->[1], $feed->[2][0];
|
printf "\t\t Enable the \\\"%s\\\" feed in opkg distfeeds.conf.\n", $feed->[1];
|
||||||
|
printf "\t\t Say M to add the feed commented out.\n";
|
||||||
printf "\n";
|
printf "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user