diff mbox series

binman: Fix extract command for using non-absolute image paths

Message ID 4231badd-d422-e27c-9a18-ed599657156f@siemens.com
State Accepted
Commit c700f109a312d0c14b5409765013af4b7335d879
Delegated to: Simon Glass
Headers show
Series binman: Fix extract command for using non-absolute image paths | expand

Commit Message

Jan Kiszka Nov. 11, 2021, 7:14 a.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

Otherwise the updated image will end up in the temporary folder that is
purged after completion.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 tools/binman/control.py | 1 +
 1 file changed, 1 insertion(+)

Comments

Simon Glass Nov. 24, 2021, 1:30 a.m. UTC | #1
Hi Jan,

On Thu, 11 Nov 2021 at 00:14, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Otherwise the updated image will end up in the temporary folder that is
> purged after completion.

Reviewed-by: Simon Glass <sjg@chromium.org>

I'd like to add a test for this.

Regards,
Simon


>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  tools/binman/control.py | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tools/binman/control.py b/tools/binman/control.py
> index 8b5085152a..c112b404ab 100644
> --- a/tools/binman/control.py
> +++ b/tools/binman/control.py
> @@ -355,6 +355,7 @@ def ReplaceEntries(image_fname, input_fname, indir, entry_paths,
>      Returns:
>          List of EntryInfo records that were written
>      """
> +    image_fname = os.path.abspath(image_fname)
>      image = Image.FromFile(image_fname)
>
>      # Replace an entry from a single file, as a special case
> --
> 2.31.1
Simon Glass Nov. 24, 2021, 5:47 p.m. UTC | #2
Hi Jan,

On Thu, 11 Nov 2021 at 00:14, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Otherwise the updated image will end up in the temporary folder that is
> purged after completion.

Reviewed-by: Simon Glass <sjg@chromium.org>

I'd like to add a test for this.

Regards,
Simon


>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  tools/binman/control.py | 1 +
>  1 file changed, 1 insertion(+)
>
Applied to u-boot-dm, thanks!
Simon Glass Nov. 24, 2021, 5:47 p.m. UTC | #3
Hi Jan,

On Thu, 11 Nov 2021 at 00:14, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Otherwise the updated image will end up in the temporary folder that is
> purged after completion.

Reviewed-by: Simon Glass <sjg@chromium.org>

I'd like to add a test for this.

Regards,
Simon


>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  tools/binman/control.py | 1 +
>  1 file changed, 1 insertion(+)
>
Applied to u-boot-dm, thanks!
Applied to u-boot-dm/next, thanks!
diff mbox series

Patch

diff --git a/tools/binman/control.py b/tools/binman/control.py
index 8b5085152a..c112b404ab 100644
--- a/tools/binman/control.py
+++ b/tools/binman/control.py
@@ -355,6 +355,7 @@  def ReplaceEntries(image_fname, input_fname, indir, entry_paths,
     Returns:
         List of EntryInfo records that were written
     """
+    image_fname = os.path.abspath(image_fname)
     image = Image.FromFile(image_fname)
 
     # Replace an entry from a single file, as a special case