aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2016-01-12 09:27:30 +0000
committerJo-Philipp Wich <jow@openwrt.org>2016-01-12 09:27:30 +0000
commit1d08d5cf7a8d80d92801859b3bed2943e6ed1925 (patch)
tree0485bd9bf494b06cf0acc9dca1e1412bfd86a333
parent4bfa2e32d7986f134fd0725fe6a2ed0876801b85 (diff)
downloadupstream-1d08d5cf7a8d80d92801859b3bed2943e6ed1925.tar.gz
upstream-1d08d5cf7a8d80d92801859b3bed2943e6ed1925.tar.bz2
upstream-1d08d5cf7a8d80d92801859b3bed2943e6ed1925.zip
CC: sdk: add base repository fallback
When the build system cannot infer its own repository url then let it fall back to http://git.openwrt.org/ for the base feed. The path to openwrt.git is guessed from the VERSION_NUMBER variable: "unknown" or "r12345" -> http://git.openwrt.org/openwrt.git "15.05.1" -> http://git.openwrt.org/15.05/openwrt.git Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> Backport of r48212 git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@48213 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/sdk/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/target/sdk/Makefile b/target/sdk/Makefile
index d81c2375e0..cf53a48eb9 100644
--- a/target/sdk/Makefile
+++ b/target/sdk/Makefile
@@ -39,6 +39,7 @@ SDK_DIRS = \
BASE_FEED:=$(shell git config --get remote.origin.url 2>/dev/null | sed -ne 's/^/src-git base /p')
BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),$(shell cd $(TOPDIR); LC_ALL=C git svn info 2>/dev/null | sed -ne 's/^URL: /src-gitsvn base /p'))
BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),$(shell cd $(TOPDIR); LC_ALL=C svn info 2>/dev/null | sed -ne 's/^URL: /src-svn base /p'))
+BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),src-git base https://git.openwrt.org/$(filter-out unknown/ r%/,$(subst $(space),.,$(wordlist 1,2,$(subst .,$(space),$(VERSION_NUMBER))))/)openwrt.git)
KDIR_BASE = $(patsubst $(TOPDIR)/%,%,$(LINUX_DIR))