From 63c16c01a0923acc70edb9e32011335e637bb361 Mon Sep 17 00:00:00 2001
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Wed, 11 Jul 2018 21:47:50 +0200
Subject: [PATCH] scripts: move DEFAULT_FEEDS definition to a separate file

modules.sh can't depend on openwrt/feeds.conf.default, otherwise the
initial update will fail.
---
 scripts/default_feeds.sh | 1 +
 scripts/feeds.sh         | 1 +
 scripts/modules.sh       | 1 -
 targets/generic          | 1 +
 4 files changed, 3 insertions(+), 1 deletion(-)
 create mode 100644 scripts/default_feeds.sh

diff --git a/scripts/default_feeds.sh b/scripts/default_feeds.sh
new file mode 100644
index 000000000..c1871730b
--- /dev/null
+++ b/scripts/default_feeds.sh
@@ -0,0 +1 @@
+DEFAULT_FEEDS="$(awk '{print $2}' openwrt/feeds.conf.default)"
diff --git a/scripts/feeds.sh b/scripts/feeds.sh
index b5857eb72..7d7d059a5 100755
--- a/scripts/feeds.sh
+++ b/scripts/feeds.sh
@@ -3,6 +3,7 @@
 set -e
 
 . scripts/modules.sh
+. scripts/default_feeds.sh
 
 
 rm -rf openwrt/tmp
diff --git a/scripts/modules.sh b/scripts/modules.sh
index dcb1bd440..4df7e5801 100644
--- a/scripts/modules.sh
+++ b/scripts/modules.sh
@@ -2,7 +2,6 @@
 [ ! -f "$GLUON_SITEDIR"/modules ] || . "$GLUON_SITEDIR"/modules
 
 FEEDS="$(echo $GLUON_FEEDS $GLUON_SITE_FEEDS | tr ' ' '\n')"
-DEFAULT_FEEDS="$(awk '{print $2}' openwrt/feeds.conf.default)"
 
 GLUON_MODULES=openwrt
 
diff --git a/targets/generic b/targets/generic
index 21ef07758..8f0bc0cc8 100644
--- a/targets/generic
+++ b/targets/generic
@@ -2,6 +2,7 @@
 
 
 . scripts/modules.sh
+. scripts/default_feeds.sh
 
 
 config "CONFIG_GLUON_SITEDIR=\"$GLUON_SITEDIR\""
-- 
GitLab