From: Ian Jackson Subject: Re: [PATCH OSSTEST v4 07/25] Debian: add preseed_create_guest helper Date: Thu, 2 Apr 2015 12:40:27 +0100 Message-ID: <21789.10923.888536.641705@mariner.uk.xensource.com> References: <1427966183.4037.17.camel@citrix.com> <1427966199-5064-7-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: <1427966199-5064-7-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 v4 07/25] Debian: add preseed_create_guest helper"): > Creates a preseed file suitable for use in a PV guest > > Signed-off-by: Ian Campbell > --- > v4: Rebase, pass $ho to preseed_base > v3: Handle $xopts{ExtraPreseed} undefined in preseed_base > --- > Osstest/Debian.pm | 29 +++++++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > > diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm > index 13cd147..993acc7 100644 > --- a/Osstest/Debian.pm > +++ b/Osstest/Debian.pm > @@ -37,6 +37,7 @@ BEGIN { > %preseed_cmds > preseed_base > preseed_create > + preseed_create_guest > preseed_ssh > preseed_hook_command preseed_hook_installscript > preseed_hook_overlay > @@ -611,6 +612,9 @@ END > sub preseed_base ($$$;@) { > my ($ho,$suite,$extra_packages,%xopts) = @_; > > + $extra_packages ||= ''; This is a little odd. You are changing preseed_base to tolerate an unspecified $extra_packages, but it's still a mandatory argument. Maybe you should mvoe the `;' in the sub prototype. Or maybe you just wanted to write: + my $extra_packages = ''; instead of: > + my $extra_packages; > + preseed_ssh($ho, $sfx); > + preseed_hook_overlay($ho, $sfx, $c{OverlayLocal}, 'overlay-local.tar'); Perhaps the OverlayLocal should always be done, rather than having to be explicitly specified by all the callers of preseed_base ? Thanks, Ian.