|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 1/3] Provide target_install_packages_nonfree_nonconcurrent
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
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |