[buildd-tools-devel] [PATCH 2/4] Explicitly use shell in setup-dpkg to ensure redirect works properly.

Wookey wookey at wookware.org
Tue Jan 17 03:07:35 UTC 2012


---
 lib/Sbuild/ResolverBase.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/Sbuild/ResolverBase.pm b/lib/Sbuild/ResolverBase.pm
index 14bf800..4d5260f 100644
--- a/lib/Sbuild/ResolverBase.pm
+++ b/lib/Sbuild/ResolverBase.pm
@@ -139,7 +139,7 @@ sub setup_dpkg {
     # If cross-building, set the correct foreign-arch
     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'],
+	    { COMMAND => ['sh', '-c', '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')],
-- 
1.7.7.3




More information about the Buildd-tools-devel mailing list