Run lintian from inside the chroot to support use-cases with several
chroots (oldstable, unstable, testing, lucid, natty, etc), where using
the system lintian might not give the best results.  By using the
lintian version from the chroot, sbuild uses always the version that
matches the distrobersion that the package is being built for.

Closes: #626361
---
 lib/Sbuild/Build.pm |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Hi Roger,

I have rebased the patch to current master, as some changes in the
dependency resolver broke it. Please find an updated version of my
patch in form of a git-commit send on behalf by 'git send-email'.

Are there any remaining blockers for applying it to the master branch?

Cheers,
Reinhard

diff --git a/lib/Sbuild/Build.pm b/lib/Sbuild/Build.pm
index ee3e7e1..aef3d38 100644
--- a/lib/Sbuild/Build.pm
+++ b/lib/Sbuild/Build.pm
@@ -1118,12 +1118,16 @@ sub run_lintian {
 
     $self->log_subsubsection("lintian");
 
+    my $resolver = $self->get('Dependency Resolver');
     my $lintian = $self->get_conf('LINTIAN');
     my @lintian_command = ($lintian);
     push @lintian_command, @{$self->get_conf('LINTIAN_OPTIONS')} if
         ($self->get_conf('LINTIAN_OPTIONS'));
     push @lintian_command, $self->get('Changes File');
-    $self->get('Host')->run_command(
+    $resolver->add_dependencies('LINTIAN', 'lintian', "", "", "", "", "");
+    return 1 unless $resolver->install_core_deps('lintian', 'LINTIAN');
+
+    $self->get('Session')->run_command(
         { COMMAND => \@lintian_command,
           PRIORITY => 0,
         });
-- 
1.7.10.4


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to