[buildd-tools-devel] Bug#763635: Bug#763635: sbuild: sbuild-update writes a stray line to stderr
Wookey
wookey at wookware.org
Wed Oct 1 18:32:26 UTC 2014
+++ Adam Borowski [2014-10-01 16:31 +0200]:
> Package: sbuild
> Version: 0.64.3-1
> Severity: normal
>
> The last version of sbuild (to which I upgraded today) writes:
> Initial foreign arches: ''
> to stderr on sbuild-update, despite all the rest of output going to stdout.
> This causes spam if one has sbuild-update in cron. I could redirect that
> away, but it's better to be able to see actual errors.
Thanks for that report. Your are right. Sorry about that.
The issue is this line in lib/Sbuild/ResolverBase.pm:
$self->log("Initial foreign arches: '@existing_foreign_arches'\n");
Which is a boring $self->log function like many many others. The only
unusual thing is the use of an array var. I don't know why passing the
array in string context to the log function is making this line come
out on the wrong file handle.
I thought the below would fix it, but it doesn't:
- $self->log("Initial foreign arches: '@existing_foreign_arches'\n");
+ $self->log('Initial foreign arches: ' . join (' ', @existing_foreign_arches) . "\n");
Running sbuild alone almost everything ends up in the log file as
expected, there are a few lines on stdout, and the offending line is
not on stderr, so why the different behaviour in sbuild-update?
I'll have to investigate further. Clues welcome from anyone with
stronger perl-foo than me.
Wookey
--
Principal hats: Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/
More information about the Buildd-tools-devel
mailing list