base-files: drop support for NAND upgrade in platform_pre_upgrade()
authorRafał Miłecki <rafal@milecki.pl>
Tue, 2 Jul 2019 14:10:57 +0000 (16:10 +0200)
committerRISCi_ATOM <bob@bobcall.me>
Fri, 13 Sep 2019 19:56:57 +0000 (15:56 -0400)
With bcm53xx switched to the new procedure there is no more need for
keeping that backward compatibility code.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit ea4e1dac71dfa015c0da10e68149478fa25878f9)

package/base-files/Makefile
package/base-files/files/lib/upgrade/common.sh
package/base-files/files/lib/upgrade/nand.sh
package/base-files/files/lib/upgrade/stage2

index f32c2b440f5ccb59dc67da1e6bf6ca6a9e9444c7..7c92486ce21439a92ee0cd89a66da253e7904c71 100644 (file)
@@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk
 include $(INCLUDE_DIR)/feeds.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=202
+PKG_RELEASE:=203
 PKG_FLAGS:=nonshared
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
index 0f6fab97f8f89840d1472935e6e545ec6da0e5c9..a13a6aaf5aefbfcf9178340506c32e71439d9d50 100644 (file)
@@ -228,9 +228,7 @@ default_do_upgrade() {
 
 do_upgrade_stage2() {
        v "Performing system upgrade..."
-       if [ -n "$do_upgrade" ]; then
-               eval "$do_upgrade"
-       elif type 'platform_do_upgrade' >/dev/null 2>/dev/null; then
+       if type 'platform_do_upgrade' >/dev/null 2>/dev/null; then
                platform_do_upgrade "$IMAGE"
        else
                default_do_upgrade "$IMAGE"
index 99916a4e96fc1c900bd12b46fb0ae168aa4899d0..9f258a82c55504d40e438eb2fe08171eb2abfdda 100644 (file)
@@ -280,15 +280,6 @@ nand_upgrade_tar() {
 
 # Recognize type of passed file and start the upgrade process
 nand_do_upgrade() {
-       if [ -n "$IS_PRE_UPGRADE" ]; then
-               # Previously, nand_do_upgrade was called from the platform_pre_upgrade
-               # hook; this piece of code handles scripts that haven't been
-               # updated. All scripts should gradually move to call nand_do_upgrade
-               # from platform_do_upgrade instead.
-               export do_upgrade="nand_do_upgrade '$1'"
-               return
-       fi
-
        local file_type=$(identify $1)
 
        if type 'platform_nand_pre_upgrade' >/dev/null 2>/dev/null; then
index bdc12c742609e1d6f49f34bfe8c5a29608fa3d9f..05d9214377fd293a19b8adb86d6c9e8e58968340 100755 (executable)
@@ -136,10 +136,7 @@ sleep 1
 
 
 if [ -n "$IMAGE" ] && type 'platform_pre_upgrade' >/dev/null 2>/dev/null; then
-       IS_PRE_UPGRADE=1 platform_pre_upgrade "$IMAGE"
-
-       # Needs to be unset again because of busybox weirdness ...
-       IS_PRE_UPGRADE=
+       platform_pre_upgrade "$IMAGE"
 fi
 
 if [ -n "$(rootfs_type)" ]; then