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

Bug#909264: [PATCH] Fix test for need to use qemu



The output of arch-test needs to have its trailing newline removed
before comparing with the expected string.

Found this while trying to use mmdebstrap without having qemu-user
installed.
---
 mmdebstrap | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mmdebstrap b/mmdebstrap
index 32881e7..d7532f4 100755
--- a/mmdebstrap
+++ b/mmdebstrap
@@ -956,6 +956,7 @@ sub main() {
     };
     open my $fh, '-|', 'arch-test', '-n', $nativearch // die "failed to fork(): $!";
     my $content = do { local $/; <$fh> };
+    chomp($content);
     close $fh;
     if ($? != 0 or $content ne "$nativearch: ok") {
 	if (!exists $deb2qemu->{$nativearch}) {
-- 
2.19.0


Reply to: