From 0fff637292666bcdf59c41ecb51e63af4e17e852 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= <karel.koci@nic.cz>
Date: Mon, 1 Jul 2019 08:36:05 +0200
Subject: [PATCH] patches/openwrt: run switch-branch with force in base-files
 postinst

---
 ...files-run-switch-brach-verify-after-update.patch | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/patches/openwrt/hack/0011-base-files-run-switch-brach-verify-after-update.patch b/patches/openwrt/hack/0011-base-files-run-switch-brach-verify-after-update.patch
index 97cf7f8cb..2fb979515 100644
--- a/patches/openwrt/hack/0011-base-files-run-switch-brach-verify-after-update.patch
+++ b/patches/openwrt/hack/0011-base-files-run-switch-brach-verify-after-update.patch
@@ -1,4 +1,4 @@
-From 55904d335d88e2126545bb9660bb8429b8909c57 Mon Sep 17 00:00:00 2001
+From 1aaef52d5d11c18a62e5f83271a5b33743da7b9a Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= <karel.koci@nic.cz>
 Date: Thu, 16 May 2019 15:52:45 +0200
 Subject: [PATCH] base-files: run switch-brach --verify after update
@@ -8,12 +8,15 @@ moves it from selected branch back to deploy. We are unable to do that
 change only on server because some branches are just binary copies of
 less stable branch. This solves it just by setting current branch back
 in distfeeds.
+
+We use --verify to not nest updater runs and --force to set any branch
+user chooses not only standard ones.
 ---
  package/base-files/Makefile | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/package/base-files/Makefile b/package/base-files/Makefile
-index c16091b6bc..dd57ebb297 100644
+index f96228a..0f2e03d 100644
 --- a/package/base-files/Makefile
 +++ b/package/base-files/Makefile
 @@ -37,7 +37,7 @@ endif
@@ -25,15 +28,15 @@ index c16091b6bc..dd57ebb297 100644
    TITLE:=Base filesystem for OpenWrt
    URL:=http://openwrt.org/
    VERSION:=$(PKG_RELEASE)-$(REVISION)
-@@ -208,6 +208,8 @@ define Package/base-files/postinst
+@@ -203,6 +203,8 @@ define Package/base-files/postinst
  			"/etc/init.d/$$L" enable
  		fi
  	done < /etc/services_wanted
 +	# Update new /etc/opkg/distfeeds.conf to point to correct repository
-+	switch-branch --verify
++	switch-branch --force --verify
  }
  endef
  
 -- 
-2.21.0
+2.22.0
 
-- 
GitLab