From 813571cb105c12229fb68a725d623f1a74e84f0e Mon Sep 17 00:00:00 2001 From: Michael Shigorin Date: Fri, 4 Nov 2011 00:14:18 +0200 Subject: [PATCH] dump sources.list to build.log The seemingly obvious feature was proposed by torabora@. APTCONF complicates things a bit of course... (and was slightly kludgy btw; fixed) --- image.in/Makefile | 7 +------ lib/profile.mk | 10 ++++++++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/image.in/Makefile b/image.in/Makefile index c05be3e5..6e011efc 100644 --- a/image.in/Makefile +++ b/image.in/Makefile @@ -18,12 +18,7 @@ COPY_TREE = ./files # outdir shouldn't be wiped clean before use CLEANUP_OUTDIR ?= -APTCONF := $(wildcard $(APTCONF)) -ifeq (,$(APTCONF)) -GLOBAL_HSH_APT_CONFIG = /etc/apt/apt.conf -else -GLOBAL_HSH_APT_CONFIG = $(APTCONF) -endif +GLOBAL_HSH_APT_CONFIG := $(wildcard $(APTCONF)) # the lib/build-*.mk comes from features.in/build-*/lib include lib/*.mk diff --git a/lib/profile.mk b/lib/profile.mk index 28d5765b..797f0038 100644 --- a/lib/profile.mk +++ b/lib/profile.mk @@ -46,6 +46,16 @@ profile/init: distclean git status -s && \ echo; \ fi $(LOG); \ + fi + @{ \ + eval `apt-config shell $${APTCONF:+-c=$(wildcard $(APTCONF))} \ + SOURCELIST Dir::Etc::sourcelist/f \ + SOURCEPARTS Dir::Etc::sourceparts/d`; \ + find "$$SOURCEPARTS" -name '*.list' \ + | xargs egrep -Rhv '^#|^[[:blank:]]*$$' "$$SOURCELIST" && \ + echo; \ + } $(LOG) + @if type -t git >&/dev/null; then \ if cd $(BUILDDIR); then \ git init -q && \ git add . && \