From 3529ae6bc2da011ddd9ee2251be91cfd93276ee4 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Thu, 23 Nov 2017 11:23:56 +0100 Subject: [PATCH] piuparts_tap: don't check only for error code 100 but accept any digit While we usally received status=100 on errors, there might be different status codes, e.g. when removing packages goes wrong: | ERROR: Command failed (status=1): ['chroot', '/var/cache/pbuilder/tmp.Vm9yxXRdcF_piuparts_tmp/tmpLZmcmg', 'eatmydata', 'dpkg', '--purge', '--pending'] Development sponsored by Sipwise GmbH, recorded as TT#25415 in customers' ticket system. --- tap/piuparts_tap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tap/piuparts_tap b/tap/piuparts_tap index e22914e..2cc6b1a 100755 --- a/tap/piuparts_tap +++ b/tap/piuparts_tap @@ -66,8 +66,8 @@ output.gsub(/:\n/, ':').each_line do |critic| cmd = /(.*)? (DEBUG: Command failed \(status=1\), but ignoring error:) (.*)?/.match(critic)[3] puts "ok #{counter} #{cmd} # skip Ignoring failed command" counter += 1 - elsif critic =~ /.*ERROR: Command failed \(status=100\):.*/ - cmd = /(.*)? (ERROR: Command failed \(status=100\):) (.*)?/.match(critic)[3] + elsif critic =~ /.*ERROR: Command failed \(status=\d+\):.*/ + cmd = /(.*)? (ERROR: Command failed \(status=\d+\):) (.*)?/.match(critic)[3] puts "not ok #{counter} #{cmd}" counter += 1 elsif critic =~ /.*ERROR: Installation of .* failed/