[buildd-tools-devel] Bug#793359: ResolverBase does not handle adding a foreign architecture correctly
Luca Falavigna
dktrkranz at debian.org
Thu Jul 23 08:34:50 UTC 2015
Package: libsbuild-perl
Version: 0.65.2-1
Tags: patch
It seems ResolverBase does not handle adding a foreign architecture correctly.
This is due to a bug in the code of the setup_dpkg function:
add_foreign_architecture is passed $session, but session hasn't got
any 'Multiarch Support' value defined in in, but $self has.
=====================================================
sub setup_dpkg {
my $self = shift;
my $session = $self->get('Session');
# Record initial foreign arch state so it can be restored
$self->set('Initial Foreign Arches', $self->get_foreign_architectures());
if ($self->get('Host Arch') ne $self->get('Build Arch')) {
add_foreign_architecture($session, $self->get('Host Arch'))
}
}
=====================================================
The first check in add_foreign_architecture is going to fail:
=====================================================
# just skip if dpkg is to old for multiarch
if (! $self->get('Multiarch Support')) { return 1 };
=====================================================
A test run with a debug statement just before this call ends up returning:
Use of uninitialized value in print at
/usr/share/perl5/Sbuild/ResolverBase.pm line 190.
I think $session shouldn't be passed as first argument, $self should.
The attached patch fixes this issue for me.
--
Cheers,
Luca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add_foreign_architecture.patch
Type: application/octet-stream
Size: 462 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20150723/cf044086/attachment.obj>
More information about the Buildd-tools-devel
mailing list