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

Elliott Mitchell ehem+debian at m5p.com
Fri Jan 15 22:59:28 GMT 2021


On Fri, Jan 15, 2021 at 06:36:04PM +0100, Hans van Kranenburg wrote:
> 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.

You prefer $replace?  Mostly the point was they *shouldn't* be merged
*inside* the script.  The replacement string being derived from two
distinct strings makes no functional difference to the script.


-- 
(\___(\___(\______          --=> 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





More information about the Pkg-xen-devel mailing list