[OpenWrt-Devel] [PATCH] feeds: Add option for build-time configuration of opkg repositories
Felix Fietkau
nbd at openwrt.org
Sat Dec 19 06:24:00 EST 2015
On 2015-12-18 05:19, openwrt at daniel.thecshore.com wrote:
> From: Daniel Dickinson <openwrt at daniel.thecshore.com>
>
> It can be convenient to separate builds into base system (included
> in SDK), and task-oriented SDK builds (so that you limit the number
> of packages which you must build at one time). For this to work
> well it is useful to use separate opkg repositories.
>
> This option adds the option to add a user-configurable list of
> opkg repositores (just the end, like feeds, for e.g. base-packages,
> vpn-packages, etc). We allow to combine separated feeds and this
> option so that you can have e.g. base-packages/base base-packages/packages
> vpn-packages/packages vpn-packages/luci and so on, if you want).
>
> Signed-off-by: Daniel Dickinson <openwrt at daniel.thecshore.com>
> ---
> include/feeds.mk | 27 ++++++++++++++++++++-------
> package/base-files/image-config.in | 25 +++++++++++++++++++++++++
> 2 files changed, 45 insertions(+), 7 deletions(-)
>
> diff --git a/include/feeds.mk b/include/feeds.mk
> index b1a8f81..ffac5cd 100644
> --- a/include/feeds.mk
> +++ b/include/feeds.mk
> @@ -28,12 +28,25 @@ endef
> # 1: destination file
> define FeedSourcesAppend
> ( \
> - $(strip $(if $(CONFIG_PER_FEED_REPO), \
> - $(foreach feed,base $(FEEDS_ENABLED),echo "src/gz %n_$(feed) %U/$(feed)";) \
> - $(if $(CONFIG_PER_FEED_REPO_ADD_DISABLED), \
> - $(foreach feed,$(FEEDS_DISABLED),echo "$(if $(CONFIG_PER_FEED_REPO_ADD_COMMENTED),# )src/gz %n_$(feed) %U/$(feed)";)) \
> - , \
> - echo "src/gz %n %U"; \
> - )) \
> + $(if $(CONFIG_SDK_REPO), \
> + $(strip $(if $(CONFIG_PER_FEED_REPO), \
> + $(foreach repo,$(CONFIG_SDK_REPO),
> + $(foreach feed,base $(FEEDS_ENABLED),echo "src/gz %n_$(repo)_$(feed) %U/$(repo)/$(feed)";) \
> + $(if $(CONFIG_PER_FEED_REPO_ADD_DISABLED), \
> + $(foreach feed,$(FEEDS_DISABLED),echo "$(if $(CONFIG_PER_FEED_REPO_ADD_COMMENTED),# )src/gz %n_$(repo)_$(feed) %U/$(repo)/$(feed)";) \
> + ) \
> + ) \
> + ,
> + $(foreach repo,$(CONFIG_SDK_REPO),echo "src/gz %n_$(repo) %U/$(repo)";) \
> + )), \
> + $(strip $(if $(CONFIG_PER_FEED_REPO), \
> + $(foreach feed,base $(FEEDS_ENABLED),echo "src/gz %n_$(feed) %U/$(feed)";) \
> + $(if $(CONFIG_PER_FEED_REPO_ADD_DISABLED), \
> + $(foreach feed,$(FEEDS_DISABLED),echo "$(if $(CONFIG_PER_FEED_REPO_ADD_COMMENTED),# )src/gz %n_$(feed) %U/$(repo)";) \
> + ) \
> + ,
> + $(echo "src/gz %n %U";) \
> + )) \
> + ) \
I don't like the duplication here, especially since the code is already
somewhat dense and hard to read. Can you make it so that the menuconfig
symbol has a default for the official repo and the code here always
generates this stuff based on that symbol?
- Felix
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list