diff mbox series

[1/1] sysupgrade need fwtool over the next stages to remove the metadata info for UBI volumes. This patch creates copy of /usr/bin/fwtool to /tmp directory to preserves it after the sysupgrade ramdisk switch. Later fwtool is being referenced from platform

Message ID 20200720191146.2926-2-todorcolov@abv.bg
State Rejected, archived
Headers show
Series [1/1] sysupgrade need fwtool over the next stages to remove the metadata info for UBI volumes. This patch creates copy of /usr/bin/fwtool to /tmp directory to preserves it after the sysupgrade ramdisk switch. Later fwtool is being referenced from platform | expand

Commit Message

Todor Colov July 20, 2020, 7:11 p.m. UTC
Signed-off-by: Todor Colov <todorcolov@abv.bg>
---
 package/base-files/files/lib/upgrade/fwtool.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Rafał Miłecki July 23, 2020, 12:28 p.m. UTC | #1
On Mon, 20 Jul 2020 at 21:15, Todor Colov <todorcolov@abv.bg> wrote:
> Signed-off-by: Todor Colov <todorcolov@abv.bg>

You put the whole commit message as the subject. Please use a short
subject message + proper description.


> @@ -36,7 +36,9 @@ fwtool_check_image() {
>                 }
>                 [ "$REQUIRE_IMAGE_METADATA" = 1 ] && return 1
>                 return 0
> -       fi
> +       fi
> +       # keep fwtool copy in /tmp for later reference from platform.sh for device specific metadata removal
> +       cp /usr/bin/fwtool /tmp/.
>
>         json_load "$(cat /tmp/sysupgrade.meta)" || {
>                 echo "Invalid image metadata"

1. Random white spaces after "fi"
2. Could RAMFS_COPY_BIN be used instead?
diff mbox series

Patch

diff --git a/package/base-files/files/lib/upgrade/fwtool.sh b/package/base-files/files/lib/upgrade/fwtool.sh
index a0b3fb0a04..e4736c06f3 100644
--- a/package/base-files/files/lib/upgrade/fwtool.sh
+++ b/package/base-files/files/lib/upgrade/fwtool.sh
@@ -36,7 +36,9 @@  fwtool_check_image() {
 		}
 		[ "$REQUIRE_IMAGE_METADATA" = 1 ] && return 1
 		return 0
-	fi
+	fi	
+	# keep fwtool copy in /tmp for later reference from platform.sh for device specific metadata removal
+	cp /usr/bin/fwtool /tmp/.
 
 	json_load "$(cat /tmp/sysupgrade.meta)" || {
 		echo "Invalid image metadata"