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

[Xen-devel] [OSSTEST PATCH 49/62] Debian: Move preseed_backports_packages earlier



No functional change.

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

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 9aa88822..25bf8e88 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -823,6 +823,50 @@ chmod 600 $subdir/etc/ssh/ssh_host_*_key ||:
 END
 }
 
+sub preseed_backports_packages ($$$$@) {
+    my ($ho, $sfx, $xopts, $suite, @pkgs) = @_;
+
+    if (! $xopts->{BackportsSourcesAlreadyAdded}++) {
+       my $bp_url = $c{"DebianSnapshotBackports_$suite"};
+       $bp_url ||= "http://$c{DebianMirrorHost}/$c{DebianMirrorSubpath}";;
+
+       my $apt_insert='';
+       my $extra_rune='';
+       if ($suite =~ m/wheezy|jessie/) {
+           # this has global effect, unfortunately
+           $extra_rune = <<END;
+d=/target/etc/apt/apt.conf.d
+mkdir -p \$d
+cat >\$d/50osstestsnapshot <<EOF
+Acquire::Check-Valid-Until false;
+EOF
+END
+       } else {
+           $apt_insert = '[check-valid-until=no]';
+       }
+
+       preseed_hook_command($ho, 'late_command', $sfx, <<END);
+#!/bin/sh
+set -ex
+
+cat <<EOF >>/target/etc/apt/sources.list
+
+# $suite backports
+deb $apt_insert $bp_url $suite-backports main
+EOF
+$extra_rune
+in-target apt-get update
+END
+    }
+
+    preseed_hook_command($ho, 'late_command', $sfx, <<END);
+#!/bin/sh
+set -ex
+
+in-target apt-get install -y -t $suite-backports @pkgs
+END
+}
+
 sub preseed_base ($$$;@) {
     my ($ho,$sfx,$extra_packages,%xopts) = @_;
 
@@ -986,50 +1030,6 @@ END
     return $preseed;
 }
 
-sub preseed_backports_packages ($$$$@) {
-    my ($ho, $sfx, $xopts, $suite, @pkgs) = @_;
-
-    if (! $xopts->{BackportsSourcesAlreadyAdded}++) {
-       my $bp_url = $c{"DebianSnapshotBackports_$suite"};
-       $bp_url ||= "http://$c{DebianMirrorHost}/$c{DebianMirrorSubpath}";;
-
-       my $apt_insert='';
-       my $extra_rune='';
-       if ($suite =~ m/wheezy|jessie/) {
-           # this has global effect, unfortunately
-           $extra_rune = <<END;
-d=/target/etc/apt/apt.conf.d
-mkdir -p \$d
-cat >\$d/50osstestsnapshot <<EOF
-Acquire::Check-Valid-Until false;
-EOF
-END
-       } else {
-           $apt_insert = '[check-valid-until=no]';
-       }
-
-       preseed_hook_command($ho, 'late_command', $sfx, <<END);
-#!/bin/sh
-set -ex
-
-cat <<EOF >>/target/etc/apt/sources.list
-
-# $suite backports
-deb $apt_insert $bp_url $suite-backports main
-EOF
-$extra_rune
-in-target apt-get update
-END
-    }
-
-    preseed_hook_command($ho, 'late_command', $sfx, <<END);
-#!/bin/sh
-set -ex
-
-in-target apt-get install -y -t $suite-backports @pkgs
-END
-}
-
 sub preseed_create_guest ($$$;@) {
     my ($ho, $arch, $sfx, %xopts) = @_;
 
-- 
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®.