qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] scripts/archive-source: Use more portable argument with tar


From: Alex Bennée
Subject: Re: [PATCH] scripts/archive-source: Use more portable argument with tar command
Date: Thu, 08 Dec 2022 17:06:59 +0000
User-agent: mu4e 1.9.3; emacs 29.0.60

Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> When using the archive-source.sh script on Darwin we get:
>
>   tar: Option --concatenate is not supported
>   Usage:
>     List:    tar -tf <archive-filename>
>     Extract: tar -xf <archive-filename>
>     Create:  tar -cf <archive-filename> [filenames...]
>     Help:    tar --help
>
> Replace the long argument added by commit 8fc76176f6 ("scripts: use
> git-archive in archive-source") by their short form to keep this
> script functional.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  scripts/archive-source.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh
> index 23e042dacd..6a710a212e 100755
> --- a/scripts/archive-source.sh
> +++ b/scripts/archive-source.sh
> @@ -67,7 +67,7 @@ for sm in $submodules; do
>      esac
>      (cd $sm; git archive --format tar --prefix "$sm/" $(tree_ish)) > 
> "$sub_file"
>      test $? -ne 0 && error "failed to archive submodule $sm ($smhash)"
> -    tar --concatenate --file "$tar_file" "$sub_file"
> +    tar -c -f "$tar_file" "$sub_file"

I'm not sure that is correct. The gnu shortform for --concatenate is -A,
-c is specifically create so I suspect you end up re-creating the
tarball rather than adding to it.

>      test $? -ne 0 && error "failed append submodule $sm to $tar_file"
>  done
>  exit 0


-- 
Alex Bennée



reply via email to

[Prev in Thread] Current Thread [Next in Thread]