From: Ian Jackson Subject: Re: [PATCH OSSTEST v2 11/15] distros: attempt pvgrub support for PV Wheezy too. Date: Fri, 2 May 2014 14:11:09 +0100 Message-ID: <21347.39277.915671.770104@mariner.uk.xensource.com> References: <1398681672.29700.55.camel@kazak.uk.xensource.com> <1398681696-2773-11-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1398681696-2773-11-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("[PATCH OSSTEST v2 11/15] distros: attempt pvgrub support for PV Wheezy too."): > diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm > index 8946ab1..ad478ab 100644 > --- a/Osstest/Debian.pm > +++ b/Osstest/Debian.pm > @@ -432,7 +432,7 @@ sub preseed_base ($$;@) { > > $extra_packages ||= ''; > > - return <<"END"; > + my $preseed= (< + $preseed .= < +d-i apt-setup/local0/repository string http://$c{DebianMirrorHost}/$c{DebianMirrorSubpath} $suite-backports main Perhaps this wants \\ (to wrap it) ? > - my $extra_packages = "pv-grub-menu" if $xopts{PvMenuLst}; > + $xopts{EnableBackports} = 1 > + if $xopts{PvMenuLst} and $suite eq "wheezy"; I normally write this as $suite =~ m/wheezy/ > + my $extra_packages = "pv-grub-menu". > + ($xopts{EnableBackports} ? "/$suite-backports" : "") > + if $xopts{PvMenuLst}; I think this is a rather strange way of doing things. It's backwards. What you mean is probably something like this: + my $extra_packages = "pv-grub-menu". + ($suite =~ m/wheezy/ ? "/$suite-backports" : "") + if $xopts{PvMenuLst}; + $xopts{EnableBackports} ||= $extra_packages =~ m#/\S+-backports\b#; or even better, do away with the EnableBackports xopt altogether and have preseed_base do it itself automatically. Ian.