[Piuparts-commits] [piuparts] 01/01: distill_alternatives_log: process all sections that use scripts-log-alternatives
Holger Levsen
holger at layer-acht.org
Wed Sep 6 13:30:20 UTC 2017
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch develop
in repository piuparts.
commit 11dc531c86a89a52e8d2267f1ae6010e9079fcb2
Author: Andreas Beckmann <anbe at debian.org>
Date: Wed Sep 6 02:33:05 2017 +0200
distill_alternatives_log: process all sections that use scripts-log-alternatives
parse piuparts.conf instead harcoding the sections here
Signed-off-by: Andreas Beckmann <anbe at debian.org>
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
TODO | 3 ---
debian/changelog | 4 +++-
master-bin/distill_alternatives_log.in | 31 ++++++++++++-------------------
3 files changed, 15 insertions(+), 23 deletions(-)
diff --git a/TODO b/TODO
index da3b4f1..1f4256f 100644
--- a/TODO
+++ b/TODO
@@ -163,9 +163,6 @@ for 0.8x and later:
- create emacspeak-broken-dpkg-preconfigure package for broken repo. (then later
put more broken packages in there and use that for testing piuparts)
-- master-bin/distill_alternatives_log: parse the config to find sections
- with scripts-log-alternatives enabled
-
(Closed) wishlist bugs are listed here so it's easier to find information
diff --git a/debian/changelog b/debian/changelog
index dfa339e..8c40f5c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
piuparts (0.81) UNRELEASED; urgency=medium
- * …
+ [ Andreas Beckmann ]
+ * master-bin/distill_alternatives_log: Parse piuparts.conf to find the
+ sections that use scripts-log-alternatives.
-- Holger Levsen <holger at debian.org> Thu, 31 Aug 2017 17:41:08 +0200
diff --git a/master-bin/distill_alternatives_log.in b/master-bin/distill_alternatives_log.in
index ceb3290..658e3ea 100644
--- a/master-bin/distill_alternatives_log.in
+++ b/master-bin/distill_alternatives_log.in
@@ -3,26 +3,19 @@ set -e
. @sharedir@/piuparts/lib/read_config.sh
+get_config_value SECTIONS global sections
get_config_value HTDOCS global output-directory
-mkdir -p ${HTDOCS}/for-manpages.d.o
-
- at libdir@/piuparts/debiman-piuparts-distill \
- -logs_dir=${HTDOCS}/experimental \
- -output=${HTDOCS}/for-manpages.d.o/experimental.json.gz
-
- at libdir@/piuparts/debiman-piuparts-distill \
- -logs_dir=${HTDOCS}/sid \
- -output=${HTDOCS}/for-manpages.d.o/sid.json.gz
- at libdir@/piuparts/debiman-piuparts-distill \
- -logs_dir=${HTDOCS}/stretch \
- -output=${HTDOCS}/for-manpages.d.o/stretch.json.gz
-
- at libdir@/piuparts/debiman-piuparts-distill \
- -logs_dir=${HTDOCS}/jessie \
- -output=${HTDOCS}/for-manpages.d.o/jessie.json.gz
+mkdir -p ${HTDOCS}/for-manpages.d.o
- at libdir@/piuparts/debiman-piuparts-distill \
- -logs_dir=${HTDOCS}/buster \
- -output=${HTDOCS}/for-manpages.d.o/buster.json.gz
+for SECTION in $SECTIONS ; do
+ test -d $HTDOCS/$SECTION || continue
+ get_config_value FLAGS $SECTION piuparts-flags ""
+ if echo "$FLAGS" | grep -q scripts-log-alternatives ; then
+ mkdir -p $(dirname ${HTDOCS}/for-manpages.d.o/${SECTION})
+ @libdir@/piuparts/debiman-piuparts-distill \
+ -logs_dir=${HTDOCS}/${SECTION} \
+ -output=${HTDOCS}/for-manpages.d.o/${SECTION}.json.gz
+ fi
+done
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git
More information about the Piuparts-commits
mailing list