[Pkg-xen-devel] [PATCH 08/16] d/shuffle-boot-files: Merge arguments together

Hans van Kranenburg hans at knorrie.org
Fri Jan 15 17:36:04 GMT 2021


Hi,

On 9/21/20 12:38 AM, Elliott Mitchell wrote:
> Rather than passing two strings which are then joined repeatedly and
> used to replace filename versions, turn them into a single string.
> 
> Signed-off-by: Elliott Mitchell <ehem+debian at m5p.com>
> ---
>  debian/rules              | 2 +-
>  debian/shuffle-boot-files | 7 +++----
>  2 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/debian/rules b/debian/rules
> index 0a7fcc9553..77ddce6b12 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -298,7 +298,7 @@ xenstore_rm = $(addprefix debian/xen-utils-common/,		\
>  override_dh_install:
>  	debian/shuffle-binaries $(upstream_version)
>  	:
> -	debian/shuffle-boot-files $(upstream_version) $(flavour)
> +	debian/shuffle-boot-files $(upstream_version)-$(flavour)
>  	:
>  	dh_install $(dh_install_excludes)
>  	if test -d debian/xen-utils-common; then rm -v $(xenstore_rm); fi
> diff --git a/debian/shuffle-boot-files b/debian/shuffle-boot-files
> index 683788d40a..0fb6567ad1 100755
> --- a/debian/shuffle-boot-files
> +++ b/debian/shuffle-boot-files
> @@ -2,11 +2,10 @@
>  
>  set -e
>  
> -version="$1"; shift
> -flavour="$1"; shift
> +newvers="$1"; shift

I don't think this improves things a lot. version-flavour tells the
reader that the contents probably look like e.g. 4.14-amd.

'newvers' does nothing like that.

>  t=debian/tmp
>  
> -hv="xen-hypervisor-$version-$flavour"
> +hv="xen-hypervisor-$newvers"
>  dest="debian/$hv/boot"
>  mkdir -p "$dest"
>  
> @@ -27,5 +26,5 @@ verstring="${verstring##*/}"
>  verstring="${verstring%.gz}"
>  
>  for f in `cd "$t/boot" && find * -type f -print`; do
> -	cp -v "$t/boot/$f" "$dest/${f/$verstring/xen-$version-$flavour}"
> +	cp -v "$t/boot/$f" "$dest/${f/$verstring/xen-$newvers}"
>  done
> 

Hans



More information about the Pkg-xen-devel mailing list