[OpenWrt-Devel] [PATCH] feeds: Add option for build-time configuration of opkg repositories
openwrt at daniel.thecshore.com
openwrt at daniel.thecshore.com
Thu Dec 17 23:19:51 EST 2015
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";) \
+ )) \
+ ) \
) >> $(1)
endef
diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in
index 3dfbedc..535c5ea 100644
--- a/package/base-files/image-config.in
+++ b/package/base-files/image-config.in
@@ -228,12 +228,37 @@ if VERSIONOPT
endif
+menuconfig SDK_REPO
+ string
+ prompt "SDK repositories" if IMAGEOPT
+ default ""
+ help
+ If set, a space separate list opkg package repositories to add
+ to the end of the repo name (e.g. if repo is
+ http://downloads.openwrt.org/%d/%n/%v/%S and this list is
+ "base-packages sdk-packages", then opkg will look for files in
+ http://downloads.openwrt.org/%d/%n/%v/%S/base-packages as the
+ first repo and
+ http://downloads.openwrt.org/%d/%n/%v/S/sdk-packages as the second
+ repo. This is also used for ImageBuilder repositories.
+ This can be used in addition to per-feed repositories, in which
+ case the repositories are <sdk_repo>/<feed_name>, e.g.
+ base-packages/base, base-packages/packages, sdk-packages/base,
+ and sdk-packages/packages.
+ Note that this does not affect bin/<arch>/packages directories;
+ that comes entirely from "Separate feed repositories" setting.
+
+
menuconfig PER_FEED_REPO
bool "Separate feed repositories" if IMAGEOPT
default y
help
If set, a separate repository is generated within bin/*/packages/
for the core packages and each enabled feed.
+ This can be used in addition to SDK repositories, in which
+ case the repositories are <sdk_repo>/<feed_name>, e.g.
+ base-packages/base, base-packages/packages, sdk-packages/base,
+ and sdk-packages/packages.
config PER_FEED_REPO_ADD_DISABLED
bool "Add available but not enabled feeds to opkg.conf"
--
2.4.3
_______________________________________________
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