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

[Xen-devel] [PATCH 07/10] Debian: Honour need-kernel-deb- flag in the installed system too



---
 Osstest/Debian.pm |   30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index e58a7cc..92d97a9 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -21,6 +21,7 @@ use strict;
 use warnings;
 
 use IO::File;
+use File::Copy;
 
 use Osstest;
 use Osstest::TestSupport;
@@ -440,6 +441,35 @@ $overlays
 echo latecmd done.
 END
 
+    foreach my $kp (keys %{ $ho->{Flags} }) {
+       $kp =~ s/need-kernel-deb-// or next;
+
+       my $d_i= 
$c{TftpPath}.'/'.$c{TftpDiBase}.'/'.$r{arch}.'/'.$c{TftpDiVersion};
+
+       my $kurl = create_webfile($ho, "kernel", sub {
+           copy("$d_i/$kp.deb", $_[0]);
+        });
+
+       my $iurl = create_webfile($ho, "initramfs-tools", sub {
+           copy("$d_i/initramfs-tools.deb", $_[0]);
+        });
+
+       preseed_hook_command($ho, 'late_command', $sfx, <<END);
+#!/bin/sh
+set -ex
+
+r=/target
+
+wget -O \$r/tmp/kern.deb $kurl
+wget -O \$r/tmp/initramfs-tools.deb $iurl
+
+# This will fail due to dependencies...
+in-target dpkg -i /tmp/kern.deb /tmp/initramfs-tools.deb || true
+# ... Now fix everything up...
+in-target apt-get install -f -y
+END
+    }
+
     my $preseed_file= (<<END);
 d-i mirror/suite string $suite
 
-- 
1.7.10.4


_______________________________________________
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®.