Re: How to forbid apt to use sources.list.d
Hi Paul,
On Tue, Nov 04, 2014 at 09:38:04AM +0800, Paul Wise wrote:
> On Tue, Nov 4, 2014 at 3:23 AM, Andreas Tille wrote:
>
> > it seems apt-get recently changed its behaviour which affects
> > blends-dev. Blends-dev defines a certain configured sources.list file
> > which is set in $aptsources. Apt is called with the following options:
> ...
> > I wonder whether this is a bug^Wfeature in apt and how I can force
> > apt to ignore this dir.
>
> The apt.conf(5) manual page makes it fairly clear that setting the
> APT_CONFIG environment variable is the only way to properly separate
> apt/dpkg from the system dpkg/apt configuration and data. For examples
> of how to do this, please see chdist from devscripts and the Debian
> derivatives census code, some references:
>
> https://anonscm.debian.org/cgit/collab-maint/devscripts.git/tree/scripts/chdist.pl#n244
> https://anonscm.debian.org/cgit/dex/census.git/tree/etc/apt.conf
> https://anonscm.debian.org/cgit/dex/census.git/tree/Makefile
Thanks for these very helpful hints. I realised that the apt
configuration in blends-dev (originally obtained from debian-edu more
than ten years ago) has not catched up with recent development. To
make sure I keep changes minimal I think I should go with
diff --git a/devtools/blend-gen-control b/devtools/blend-gen-control
index 46a61e5..e52a7d3 100755
--- a/devtools/blend-gen-control
+++ b/devtools/blend-gen-control
@@ -119,7 +119,14 @@ sub apt {
my $op = shift;
my $aptdir = "../tmp/apt";
+ # FIXME: For propper apt configuration see
+ # https://lists.debian.org/debian-mentors/2014/11/msg00032.html
+ # https://lists.debian.org/debian-mentors/2014/11/msg00033.html
+ # For the moment to do only minimal changes in freeze time we set
+ # Dir::Etc::sourceparts=none
+ # to prevent including random sources from users sources.list.d
my @aptopts = ("Dir::Etc::sourcelist=$aptsources",
+ "Dir::Etc::sourceparts=none",
"Dir::State=$aptdir/state",
"Dir::Cache=$aptdir/cache",
"Dir::State::Status=/dev/null",
for the moment. This reliably excludes any random sources.list entries
and after Jessie release I'll either switch to the new blends-dev on
GSoC which does not have this problem by design or will fix it in the
manner suggested by you.
Any comments?
Kind regards
Andreas.
--
http://fam-tille.de
Reply to: