From 7fa4f5e12261d39666283051956d9e1f78eb609b Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 14 Jan 2016 14:45:37 +0100 Subject: evaluate sourceslist-list-format entity in vendors sources.list Parsing XML entity files in shell isn't exactly nice and causing the substitution with a while-read loop isn't either, but it seems to be good enough for the moment without changing too much. Thanks: Niels Thykier for reporting on IRC --- vendor/vendor.makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'vendor/vendor.makefile') diff --git a/vendor/vendor.makefile b/vendor/vendor.makefile index 40b35ea3d..32de3b0d5 100644 --- a/vendor/vendor.makefile +++ b/vendor/vendor.makefile @@ -8,14 +8,21 @@ include ../../buildlib/defaults.mak doc binary manpages: sources.list sources.list: sources.list.in ../../doc/apt-verbatim.ent - sed -e 's#&debian-stable-codename;#$(shell ../getinfo debian-stable-codename)#g' \ + while read line; do \ + if [ "$${line}" = '&sourceslist-list-format;' ]; then \ + $(BASE)/vendor/getinfo vendor sourceslist-list-format ; \ + else \ + echo "$${line}"; \ + fi \ + done < $< | sed -e 's#&debian-stable-codename;#$(shell ../getinfo debian-stable-codename)#g' \ -e 's#&debian-oldstable-codename;#$(shell ../getinfo debian-oldstable-codename)#g' \ -e 's#&debian-testing-codename;#$(shell ../getinfo debian-testing-codename)#g' \ -e 's#&ubuntu-codename;#$(shell ../getinfo ubuntu-codename)#g' \ -e 's#¤t-codename;#$(shell ../getinfo current-codename)#g' \ - $< > $@ + > $@ clean: clean/sources.list +veryclean: clean/sources.list clean/sources.list: rm -f sources.list -- cgit v1.2.3