Elliott Mitchell
2021-Jan-04 06:13 UTC
[Pkg-xen-devel] [PATCH 08/16] d/shuffle-boot-files: Merge arguments together
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 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 -- -- (\___(\___(\______ --=> 8-) EHM <=-- ______/)___/)___/) \BS ( | ehem+sigmsg at m5p.com PGP 87145445 | ) / \_CS\ | _____ -O #include <stddisclaimer.h> O- _____ | / _/ 8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445
Hans van Kranenburg
2021-Jan-15 17:36 UTC
[Pkg-xen-devel] [PATCH 08/16] d/shuffle-boot-files: Merge arguments together
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"; shiftI 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