Skip to contentSkip to conversation

ts-debian-fixup: Install the overlays

PATCH New Ian Jackson 1 participant 1 message Sep 29, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 7/7 ts-debian-fixup: Install the overlays

We want debootstrap-installed guests to get these overlays too.

---
v2: Use a tmpfile rather than a stashfile for the tarball.

---
 ts-debian-fixup |   13 +++++++++++++
 1 file changed, 13 insertions(+)
ts-debian-fixup +13 -0
index 6d24587..75c93e3 100755
@@ -19,6 +19,7 @@ use strict qw(vars);
 use DBI;
 use Osstest;
 use Osstest::TestSupport;
+use Osstest::Debian;
 
 tsreadconfig();
 
@@ -64,6 +65,17 @@ sub access () {
 END
 }
 
+sub overlay ($$) {
+    my ($srcdir, $tfilename) = @_;
+
+    my $fh = IO::File::new_tmpfile() or die $!;
+    contents_make_cpio($fh,'ustar',$srcdir);
+    seek $fh,0,0 or die "$!";
+    target_cmd_inputfh_root($ho, $fh, <<END);
+        tar -C $mountpoint -xf -
+END
+}
+
 our $extra;
 
 sub console () {
@@ -175,6 +187,7 @@ savecfg();
 ether();
 target_kernkind_check($gho);
 access();
+debian_overlays(\&overlay);
 console();
 filesystems();
 otherfixupcfg();
Signature · 1 line
1.7.10.4