@@ -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");
}
}
From: Wookey <wookey@wookware.org> --- lib/Sbuild/ResolverBase.pm | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-)