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

[Xen-devel] [OSSTEST PATCH 1/3] Provide target_install_packages_nonfree_nonconcurrent


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Date: Thu, 19 Dec 2019 17:57:28 +0000
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=ian.jackson@xxxxxxxxxxxxx; spf=Pass smtp.mailfrom=Ian.Jackson@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Delivery-date: Thu, 19 Dec 2019 17:57:47 +0000
  • Ironport-sdr: 1TXFb/oO9IHUGw5+c+jKlYCmGoOsGAeVXIKxmHCNScxK1msVI6FnLBpPZDarhbCMN9jXKrtI// em00Bx3ba4EIBXUl8sb8rZT6/1XYzVuDQ+KJtXWpeHrHebifwZxSrP8dqlsS7M+vOCejIQZD8v AN6sXEp3HtHlBfUKcgnODt8fuQ0gO38qPUPrsLsVjrEUX82oS/KmHTs9Jz/E1u1x9c9KGlIofK ykOoy6N9a37kbFBTuvHINx0hMdCp0nFGfeKFT55Mj2QhWGPzP3x++MH3O2l/81yX8HnSI5GTJL Yv0=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Right now this is only useful with Debian.  We will call it from
ts-host-install to install the microcode.

We enable and then disable non-free so that we don't install non-free
packages unintentionally.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 Osstest/TestSupport.pm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 44f01a86..63087260 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -71,6 +71,7 @@ BEGIN {
                       target_editfile_kvp_replace
                       target_run_pkgmanager_install
                       target_install_packages target_install_packages_norec
+                     target_install_packages_nonfree_nonconcurrent
                       target_jobdir target_extract_jobdistpath_subdir
                       target_extract_jobdistpath target_extract_distpart
                      target_tftp_prefix
@@ -627,6 +628,21 @@ sub target_install_packages_norec ($@) {
     my ($ho, @packages) = @_;
     target_run_pkgmanager_install($ho,\@packages,1);
 }
+sub target_install_packages_nonfree_nonconcurrent ($@) {
+    # inadequate locking, should be called during installation only
+    my ($ho, @packages) = @_;
+    my $slist= '/etc/apt/sources.list';
+    my $xsuites= 'contrib non-free';
+    target_cmd_root($ho, <<END, 30);
+    perl -i~ -pe 'next unless m/^deb/; s{ main\$}{\$& $xsuites};' $slist
+    apt update
+END
+    target_run_pkgmanager_install($ho,\@packages);
+    target_cmd_root($ho, <<END, 30);
+    mv $slist~ $slist
+    apt update
+END
+}
 
 sub tpfcs_core {
     my ($tputfilef,$ho,$timeout,$filedata, $rdest,$lleaf) = @_;
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.