Package: sbuild
Version: 0.70.0-1
Severity: important
Tags: patch

Hi,

The current version of sbuild is cleaning up the extra repositories before 
using them. This was introduced by 0e71b40, adding extra repositories unlink 
to cleanup_apt_archive, which is called at the end of the resolvers 
install_deps', which in turn is called by install_core_deps and 
install_main_deps.

Since a normal build has a install_core_deps call before the 
install_main_deps, the extra repositories are missing for the main part.

The aptitude resolver is not affected as it's not calling the 
cleanup_apt_archive (I'm assuming that this relays on Build calling cleanup at 
the right moments), the attached patch removes the cleanup_apt_archive 
invocation from the resolvers assuming that the aptitude approach is correct.

Happy hacking,

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'buildd-unstable'), (500, 
'testing'), (500, 'stable'), (50, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armhf

Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

Versions of packages sbuild depends on:
ii  adduser         3.115
ii  apt-utils       1.3~pre2
ii  libsbuild-perl  0.70.0-1
pn  perl:any        <none>

Versions of packages sbuild recommends:
ii  debootstrap  1.0.81
ii  fakeroot     1.21-1

Versions of packages sbuild suggests:
ii  deborphan  1.7.28.8-0.3
ii  wget       1.18-2

-- Configuration Files:
/etc/sbuild/sbuild.conf changed [not included]

-- no debconf information
>From e9789f49aaf6828c817976c4982c29c72e8c2765 Mon Sep 17 00:00:00 2001
From: Maximiliano Curia <m...@gnuservers.com.ar>
Date: Tue, 16 Aug 2016 11:48:09 +0200
Subject: [PATCH] Avoid dropping extra repositories before using them

apt aspcud and xapt resolvers were dropping the extra repositories since
0e71b40 was introduced, the aptitude resolver is not affected since it's
not calling the cleanup_apt_archive, assuming this is the correct
approach, this patch removes the cleanup_apt_archive in the resolvers.
---
 lib/Sbuild/AptResolver.pm    | 2 --
 lib/Sbuild/AspcudResolver.pm | 2 --
 lib/Sbuild/XaptResolver.pm   | 2 --
 3 files changed, 6 deletions(-)

diff --git a/lib/Sbuild/AptResolver.pm b/lib/Sbuild/AptResolver.pm
index b10dca7..a362194 100644
--- a/lib/Sbuild/AptResolver.pm
+++ b/lib/Sbuild/AptResolver.pm
@@ -104,8 +104,6 @@ sub install_deps {
 	}
     }
 
-    $self->cleanup_apt_archive();
-
     return $status;
 }
 
diff --git a/lib/Sbuild/AspcudResolver.pm b/lib/Sbuild/AspcudResolver.pm
index c846a9c..6d51f40 100644
--- a/lib/Sbuild/AspcudResolver.pm
+++ b/lib/Sbuild/AspcudResolver.pm
@@ -117,8 +117,6 @@ sub install_deps {
     }
 
   cleanup:
-    $self->cleanup_apt_archive();
-
     return $status;
 }
 
diff --git a/lib/Sbuild/XaptResolver.pm b/lib/Sbuild/XaptResolver.pm
index 139c202..09d866f 100644
--- a/lib/Sbuild/XaptResolver.pm
+++ b/lib/Sbuild/XaptResolver.pm
@@ -94,8 +94,6 @@ sub install_deps {
 	}
     }
 
-    $self->cleanup_apt_archive();
-
     return $status;
 }
 
-- 
2.8.1

Reply via email to