All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: xen-devel@lists.xenproject.org, ian.jackson@eu.citrix.com
Subject: Re: [PATCH OSSTEST 3/5] Cope with Jessie's d-i vg name
Date: Thu, 21 May 2015 16:10:02 +0100	[thread overview]
Message-ID: <1432221002.10746.76.camel@citrix.com> (raw)
In-Reply-To: <1432144588-2102-4-git-send-email-wei.liu2@citrix.com>

On Wed, 2015-05-20 at 18:56 +0100, Wei Liu wrote:
> In ts-xen-build-prep, replace matching lenny with jessie since lenny is
> not used in production anymore.

AIUI the default VG name scheme changed? Can you say how here please.

Also I think in general we should aim for the "non-exceptional" case to
be the default one, and use explicit matching for issues with historical
versions. IOW test for wheezy and earlier and override the default (i.e.
Jessie) name. The rationale is that we shouldn't need to add Stretch
here too unless it also differs from Jessie.

That principal seems to apply to a some of the following patches too.

WRT "wheezy and earlier" I've been wondering about providing a function
to transform a Debian code name to a sortable integer. e.g.

sub debver($) {
    my %vers = qw(Lenny 50
                  Squeeze 60
                  Wheezy 70
                  Jessie 80
                  Stretch 90
                  Sid 1000000);
    # Unknown is > sid...
    return $vers{ucfirst($_[0])) // 1000001;
}

so you can do things like
    if ( debver($ho->{Suite}) < debver('jessie') ) {
        workaround_a_thing();

Thoughts?
Ian.

> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> ---
>  ts-host-install   | 4 +++-
>  ts-xen-build-prep | 4 ++--
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/ts-host-install b/ts-host-install
> index b73c7ff..6e2106e 100755
> --- a/ts-host-install
> +++ b/ts-host-install
> @@ -87,7 +87,9 @@ END
>  
>      await_tcp(get_timeout($ho,'reboot',$timeout{Sshd}), 14,$ho);
>  
> -    our $vgname= $ho->{Name};
> +    our $vgname= $ho->{Suite} =~ m/jessie/
> +                 ? "$ho->{Name}-vg"
> +                 : $ho->{Name};
>  
>      if ($ho->{Suite} =~ m/lenny/) {
>          $vgname .= ".$c{TestHostDomain}";
> diff --git a/ts-xen-build-prep b/ts-xen-build-prep
> index 4dece65..25ba3d4 100755
> --- a/ts-xen-build-prep
> +++ b/ts-xen-build-prep
> @@ -53,8 +53,8 @@ sub overall_limit_pe ($) {
>  
>  sub determine_vg_lv () {
>      $vg=
> -        $ho->{Suite} =~ m/lenny/
> -        ? "$ho->{Name}.$c{TestHostDomain}"
> +        $ho->{Suite} =~ m/jessie/
> +        ? "$ho->{Name}-vg"
>          : $ho->{Name};
>      $lv = "/dev/$vg/$lvleaf";
>  }

  reply	other threads:[~2015-05-21 16:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20 17:56 [PATCH OSSTEST 0/5] Debian Jessie patches Wei Liu
2015-05-20 17:56 ` [PATCH OSSTEST 1/5] mg-debian-installer-update: use new url for armhf packages Wei Liu
2015-05-21 15:04   ` Ian Campbell
2015-05-20 17:56 ` [PATCH OSSTEST 2/5] Debian.pm: install grub to default device Wei Liu
2015-05-20 17:56 ` [PATCH OSSTEST 3/5] Cope with Jessie's d-i vg name Wei Liu
2015-05-21 15:10   ` Ian Campbell [this message]
2015-05-21 16:04     ` Wei Liu
2015-05-21 16:15       ` Ian Campbell
2015-05-21 16:24         ` Wei Liu
2015-06-12 13:39         ` Ian Jackson
2015-05-20 17:56 ` [PATCH OSSTEST 4/5] ts-xen-build-prep: install libnl-route-3-dev on Jessie Wei Liu
2015-05-20 17:56 ` [PATCH OSSTEST 5/5] ts-xen-build-prep: install libc6-dev-i386 for jessie Wei Liu
2015-05-20 18:04 ` [PATCH OSSTEST 0/5] Debian Jessie patches Wei Liu
2015-06-10  9:50   ` Ian Campbell
2015-06-12 20:43     ` Wei Liu
2015-06-15  8:29       ` Wei Liu
2015-06-15  8:37         ` Ian Campbell
2015-06-15  8:41           ` Ian Campbell
2015-05-28 10:28 ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1432221002.10746.76.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.