From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [OSSTEST v6 13/24] distros: support PV guest install from Debian netinst media. Date: Fri, 15 May 2015 09:58:23 +0100 Message-ID: <1431680303.8943.15.camel@citrix.com> References: <1430905605.2660.187.camel@citrix.com> <1430906213-30108-13-git-send-email-ian.campbell@citrix.com> <21842.8616.482657.154030@mariner.uk.xensource.com> <1431508008.8263.219.camel@citrix.com> <21844.58094.540250.732158@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21844.58094.540250.732158@mariner.uk.xensource.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 Jackson Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, 2015-05-14 at 19:01 +0100, Ian Jackson wrote: > Ian Campbell writes ("Re: [OSSTEST v6 13/24] distros: support PV guest install from Debian netinst media."): > > On Tue, 2015-05-12 at 16:52 +0100, Ian Jackson wrote: > > > Wrap damage on my screen. I appreciate that you want to retain the > > > tabular nature, but perhaps > > > > > > my %arch_props = ( > > > amd64 => [ "multi-arch", "amd64-i386", "/install.amd/xen" }, > > > i386 => [ "multi-arch", "amd64-i386", "/install.386/xen" }, > > > armhf => [ "armhf", "armhf", "/install.armhf" }, > > > ) > > > my ( $path_arch, $file_arch, $iso_path ) = > > > @{ $arch_props{$arch} }; > ... > > More Perl-fu than I could muster by myself, but looks good to me ;-) > > You didn't spot the [...} then ? :-) I did when I copied it, before I ran it even. Actually, this all goes away (or rather becomes case..esac in the make-flight bash script) with the proposal below. > > > > + my $baseurl = $cd eq "current" ? > > > > + "http://cdimage.debian.org/debian-cd/current/$props->{PathArch}/jigdo-cd" : > > > > + "http://cdimage.debian.org/cdimage/weekly-builds/$props->{PathArch}/jigdo-cd"; > > > > > > This should surely come from a runvar (or perhaps a config option) > > > rather than being hardcoded. > > > > $cd above came from $r{"$gho->{Guest}_cd"} and takes the values either > > "current" or "weekly". > > > > I could push the logic which mas those to an actual URL into > > make-distros-flight if you would prefer? Or perhaps push the two > > prefixes (up to but not including "$props->.../jigdo-cd") into the cfg > > file? So it would become "$c{DebianCdURL_ > > $cd}/$props->{PathArch}/jigdo-cd" > > (We had a conversation IRL about some of this, but:) > > Hardcoding something in make-flight is not as bad as hardcoding it in > the script, IMO, but: > > > The latter sounds a bit preferable I think, hardcoding URLs in > > make-flight seems as wrong as hardcoding them here. > > Having it in the config is best. You might want to consider whether > the config ought to be plumbed through a runvar by make-flight, so > that it is possible to (eg) use cs-adjust-flight or whatever to do > tests of different things. After our RL conversation I've moved the URLs to make-flight and actually it looks ok, I've got a few kinks to work out but I think it should work ok. Ian.