[buildd-tools-devel] [PATCH 2352/2353] Add an error check in dpkg_setup, and fix up whitespace
wookey at wookware.org
wookey at wookware.org
Mon Dec 19 14:47:35 UTC 2011
From: Wookey <wookey at wookware.org>
---
lib/Sbuild/ResolverBase.pm | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/lib/Sbuild/ResolverBase.pm b/lib/Sbuild/ResolverBase.pm
index 963e194..06ac8fc 100644
--- a/lib/Sbuild/ResolverBase.pm
+++ b/lib/Sbuild/ResolverBase.pm
@@ -140,11 +140,15 @@ sub setup_dpkg {
if ($self->get_conf('HOST_ARCH') ne $self->get_conf('BUILD_ARCH')) {
$session->run_command(
- { COMMAND => ['echo', 'foreign-architecture ' . $self->get_conf('HOST_ARCH'), '>', '/etc/dpkg/dpk.cfg.d/sbuild'],
- USER => 'root' });
- # We should get this much nicer interface with new dpkg upload.
- # { COMMAND => ['dpkg', '--add-foreign-architecture ', $self->get_conf('HOST_ARCH')],
- # USER => 'root' });
+ { COMMAND => ['echo', '"foreign-architecture ' . $self->get_conf('HOST_ARCH') . '"', '>', '/etc/dpkg/dpkg.cfg.d/sbuild'],
+ USER => 'root' });
+ # We should get this much nicer interface with new dpkg upload.
+ # { COMMAND => ['dpkg', '--add-foreign-architecture ', $self->get_conf('HOST_ARCH')],
+ # USER => 'root' });
+ if ($?) {
+ $self->log_error("E: Failed to set dpkg foreign-architecture config\n");
+ return 0;
+ }
$self->log("Setting dpkg foreign-architecture\n");
}
}
--
1.7.7.3
More information about the Buildd-tools-devel
mailing list