Author: jow
Date: 2016-01-12 10:25:45 +0100 (Tue, 12 Jan 2016)
New Revision: 48212

Modified:
   trunk/target/sdk/Makefile
Log:
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 <[email protected]>

Modified: trunk/target/sdk/Makefile
===================================================================
--- trunk/target/sdk/Makefile   2016-01-12 07:54:25 UTC (rev 48211)
+++ trunk/target/sdk/Makefile   2016-01-12 09:25:45 UTC (rev 48212)
@@ -37,6 +37,7 @@
 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))
 
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to