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

Re: [Xen-devel] [PATCH OSSTEST 3/5] Cope with Jessie's d-i vg name



On Thu, May 21, 2015 at 05:15:55PM +0100, Ian Campbell wrote:
> On Thu, 2015-05-21 at 17:04 +0100, Wei Liu wrote:
> > On Thu, May 21, 2015 at 04:10:02PM +0100, Ian Campbell wrote:
> > > 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.
> > > 
> > 
> > Sure.
> > 
> > > 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();
> > > 
> > 
> > You would need to test for "$ho->{Suite} == A" or "A < $ho->{Suite} < B".
> 
> if ( debver($ho->{Suite}) <= debver('squeeze') )
>     handle Squeeze or earlier
> elseif ( debver($ho->{Suite}) <= debver('wheezy') )
>     handle Wheezy
> else
>     handle Jessie onwards
> 
> I'm not sure if Perl supports
>         debver('squeeze') < debver($ho->{Suite}) <= debver('wheezy')
> like some languages do.
> 

I was just writing pseudo code.

> > And it's just another form of saying "if ($ho->{Suite} =~ /XXX/)" IMHO.
> 
> The difference is you don't need to enumerate all the names. e.g.
> "lenny|squeeze|wheezy" becomes "< debver('wheezy')"
> 
> > > Thoughts?
> > 
> > That would be nice but I doubt it would be of much use -- who
> > doesn't want the latest version in production... ;-)
> 
> People who think it is useful to continue to test Wheezy for some
> reason? People who have other constraints preventing them from upgrading
> right away? People who want to use a _newer_ version for some reason and
> want to make Stretch work while not breaking Wheezy/Jessie for everyone
> else.
> 
> If it were expensive to support I'd agree, but I don't think it is,
> especially if you arrange to never need to touch it again...
> 
> BTW, at some point I'm hoping to extend my distros flight stuff to cover
> testing the distro host packages, at which point it would naturally be
> useful to cover at least current stable and current testing, if not
> oldstable or sid.
> 

Yeah, this is a valid use case for that.

Wei.

> Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.