diff mbox

[2/7] Merge in last missing bits in Build.pm for packages Not clear if this should be $self->get('Host_Arch') or $self->get_conf('HOST_ARCH') throughout.

Message ID 1324299198-14640-2-git-send-email-wookey@wookware.org
State Accepted
Headers show

Commit Message

Wookey Dec. 19, 2011, 12:53 p.m. UTC
From: Wookey <wookey@wookware.org>

---
 lib/Sbuild/Build.pm |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
diff mbox

Patch

diff --git a/lib/Sbuild/Build.pm b/lib/Sbuild/Build.pm
index b7ab733..e8ac807 100644
--- a/lib/Sbuild/Build.pm
+++ b/lib/Sbuild/Build.pm
@@ -273,7 +273,7 @@  sub run {
 	$self->set('Pkg End Time', $self->get('Pkg Start Time'));
 
 	# Acquire the architecture we're building for.
-	$self->set('Arch', $self->get_conf('ARCH'));
+	$self->set('Host_Arch', $self->get_conf('HOST_ARCH'));
 
 	my $dist = $self->get_conf('DISTRIBUTION');
 	if (!defined($dist) || !$dist) {
@@ -1002,7 +1002,7 @@  sub fetch_source_files {
 	}
     }
 
-    debug("Arch check ok ($arch included in $dscarchs)\n");
+    debug("Arch check ok ($host_arch included in $dscarchs)\n");
 
     $self->set('Build Depends', $build_depends);
     $self->set('Build Depends Arch', $build_depends_arch);
@@ -2056,7 +2056,7 @@  sub open_build_log {
 
     my $filename = $self->get_conf('LOG_DIR') . '/' .
 	$self->get('Package_SVersion') . '-' .
-	$self->get('Arch') .
+	$self->get_conf('HOST_ARCH') .
 	"-$date";
 
     open($saved_stdout, ">&STDOUT") or warn "Can't redirect stdout\n";
@@ -2074,7 +2074,7 @@  sub open_build_log {
 	$SIG{'QUIT'} = 'IGNORE';
 	$SIG{'PIPE'} = 'IGNORE';
 
-	$PROGRAM_NAME = 'package log for ' . $self->get('Package_SVersion') . '_' . $self->get('Arch');
+	$PROGRAM_NAME = 'package log for ' . $self->get('Package_SVersion') . '_' . $self->get('Host_Arch');
 
 	if (!$self->get_conf('NOLOG') &&
 	    $self->get_conf('LOG_DIR_AVAILABLE')) {
@@ -2093,7 +2093,7 @@  sub open_build_log {
 		$self->log_symlink($filename,
 				   $self->get_conf('BUILD_DIR') . '/' .
 				   $self->get('Package_SVersion') . '_' .
-				   $self->get('Arch') . '.build');
+				   $self->get('Host_Arch') . '.build');
 	    }
 	}
 
@@ -2192,7 +2192,7 @@  sub open_build_log {
     $self->log("Version: " . $self->get('Version') . "\n");
     $self->log("Source Version: " . $self->get('OVersion') . "\n");
     $self->log("Distribution: " . $self->get_conf('DISTRIBUTION') . "\n");
-    $self->log("Architecture: " . $self->get_conf('BUILD_ARCH') . "\n");
+    $self->log("Machine Architecture: " . $self->get_conf('ARCH') . "\n");
     $self->log("Host Architecture: " . $self->get_conf('HOST_ARCH') . "\n");
     $self->log("Build Architecture: " . $self->get_conf('BUILD_ARCH') . "\n");
     $self->log("\n");
@@ -2237,15 +2237,15 @@  sub close_build_log {
 	if (defined($self->get_conf('KEY_ID')) && $self->get_conf('KEY_ID')) {
 	    my $key_id = $self->get_conf('KEY_ID');
 	    $self->log(sprintf("Signature with key '%s' requested:\n", $key_id));
-	    my $changes = $self->get('Package_SVersion') . '_' . $self->get('Arch') . '.changes';
+	    my $changes = $self->get('Package_SVersion') . '_' . $self->get('Host_Arch') . '.changes';
 	    system (sprintf('debsign -k%s %s', $key_id, $changes));
 	}
     }
 
     my $subject = "Log for " . $self->get_status() .
 	" build of " . $self->get('Package_Version');
-    if ($self->get('Arch')) {
-	$subject .= " on " . $self->get('Arch');
+    if ($self->get_conf('HOST_ARCH')) {
+	$subject .= " on " . $self->get_conf('HOST_ARCH');
     }
     if ($self->get_conf('ARCHIVE')) {
 	$subject .= " (" . $self->get_conf('ARCHIVE') . "/" . $self->get_conf('DISTRIBUTION') . ")";
@@ -2344,7 +2344,7 @@  sub send_mime_build_log {
 		);
     }
 
-    my $changes = $self->get('Package_SVersion') . '_' . $self->get('Arch') . '.changes';
+    my $changes = $self->get('Package_SVersion') . '_' . $self->get('Host_Arch') . '.changes';
     if ($self->get_status() eq 'successful' && -r $changes) {
 	my $log_part = MIME::Lite->new(
 		Type     => 'text/plain',