Skip to content

Commit 32a0b8c

Browse files
committed
include/version.mk: rework repository url handling
- Add %A placeholder for substituting the package architecture - Change %U placeholder to refer to the toplevel repository URL - Construct package feed URLs relative to the toplevel one to match new layout Signed-off-by: Jo-Philipp Wich <[email protected]>
1 parent 5170393 commit 32a0b8c

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

include/feeds.mk

+3-5
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,10 @@ endef
4343
# 1: destination file
4444
define FeedSourcesAppend
4545
( \
46+
echo "src/gz %n_core %U/targets/%S/packages"; \
4647
$(strip $(if $(CONFIG_PER_FEED_REPO), \
47-
$(foreach feed,base kernel $(FEEDS_ENABLED),echo "src/gz %n_$(feed) %U/$(feed)";) \
48+
$(foreach feed,base $(FEEDS_ENABLED),echo "src/gz %n_$(feed) %U/packages/%A/$(feed)";) \
4849
$(if $(CONFIG_PER_FEED_REPO_ADD_DISABLED), \
49-
$(foreach feed,$(FEEDS_DISABLED),echo "$(if $(CONFIG_PER_FEED_REPO_ADD_COMMENTED),# )src/gz %n_$(feed) %U/$(feed)";)) \
50-
, \
51-
echo "src/gz %n %U"; \
52-
)) \
50+
$(foreach feed,$(FEEDS_DISABLED),echo "$(if $(CONFIG_PER_FEED_REPO_ADD_COMMENTED),# )src/gz %n_$(feed) %U/packages/%A/$(feed)";)))) \
5351
) >> $(1)
5452
endef

include/version.mk

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#
22
# Copyright (C) 2012-2015 OpenWrt.org
3+
# Copyright (C) 2016 LEDE Project
34
#
45
# This is free software, licensed under the GNU General Public License v2.
56
# See /LICENSE for more information.
@@ -31,7 +32,7 @@ VERSION_NICK:=$(call qstrip_escape,$(CONFIG_VERSION_NICK))
3132
VERSION_NICK:=$(if $(VERSION_NICK),$(VERSION_NICK),$(RELEASE))
3233

3334
VERSION_REPO:=$(call qstrip_escape,$(CONFIG_VERSION_REPO))
34-
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),http://downloads.lede-project.org/snapshots/trunk/%S/packages)
35+
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),http://downloads.lede-project.org/snapshots)
3536

3637
VERSION_DIST:=$(call qstrip_escape,$(CONFIG_VERSION_DIST))
3738
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),LEDE)
@@ -84,6 +85,7 @@ VERSION_SED:=$(SED) 's,%U,$(VERSION_REPO),g' \
8485
-e 's,%R,$(REVISION),g' \
8586
-e 's,%T,$(BOARD),g' \
8687
-e 's,%S,$(BOARD)/$(if $(SUBTARGET),$(SUBTARGET),generic),g' \
88+
-e 's,%A,$(ARCH_PACKAGES),g' \
8789
-e 's,%t,$(VERSION_TAINTS),g' \
8890
-e 's,%M,$(VERSION_MANUFACTURER),g' \
8991
-e 's,%m,$(VERSION_MANUFACTURER_URL),g' \

package/base-files/image-config.in

+2-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ if VERSIONOPT
170170
config VERSION_REPO
171171
string
172172
prompt "Release repository"
173-
default "http://downloads.lede-project.org/snapshots/trunk/%S/packages"
173+
default "http://downloads.lede-project.org/snapshots"
174174
help
175175
This is the repository address embedded in the image, it defaults
176176
to the trunk snapshot repo; the url may contain the following placeholders:
@@ -185,6 +185,7 @@ if VERSIONOPT
185185
%d .. Distribution name or "lede", lowercase
186186
%T .. Target name
187187
%S .. Target/Subtarget name
188+
%A .. Package architecture
188189
%t .. Build taint flags, e.g. "no-all busybox"
189190
%M .. Manufacturer name or "Lede"
190191
%P .. Product name or "Generic"

0 commit comments

Comments
 (0)