Bug#447326: updated patch
This updated patch installs the popcon hook as '10popcon' per Otavio's
suggestion adn and updates the status bar per Joey's. One additional
question though: the names of the hook directories seem somewhat
inconsistent, is pre-pkgsel.d the right name to use here?
--
dann frazier
Index: debian/pkgsel.templates
===================================================================
--- debian/pkgsel.templates (revision 49858)
+++ debian/pkgsel.templates (working copy)
@@ -31,3 +31,7 @@
Type: string
Description: for internal use; can be preseeded
Comma/space-separated list of extra packages to install
+
+Template: pkgsel/progress/fallback
+Type: text
+_Description: Running ${SCRIPT}...
Index: debian/postinst
===================================================================
--- debian/postinst (revision 49858)
+++ debian/postinst (working copy)
@@ -39,12 +39,25 @@
db_progress STEP 1
-# Install popularity-contest but remove it if the user decides not to
-# participate.
-if in-target sh -c "$config debconf-apt-progress --from 1 --to 5 --logstderr -- apt-get -o APT::Install-Recommends=false -q -y -f install popularity-contest"; then
- if ! grep -q '^PARTICIPATE=\"*yes\"*' /target/etc/popularity-contest.conf; then
- in-target dpkg --purge popularity-contest
- fi
+partsdir="/usr/lib/pre-pkgsel.d"
+if [ -d "$partsdir" ]; then
+ for script in `ls "$partsdir"/*`; do
+ base=$(basename $script | sed 's/[0-9]*//')
+ if ! db_progress INFO pkgsel/progress/$base; then
+ db_subst pkgsel/progress/fallback SCRIPT "$base"
+ db_progress INFO pkgsel/progress/fallback
+ fi
+ if [ -x "$script" ] ; then
+ # be careful to preserve exit code
+ if log-output -t pkgsel "$script"; then
+ :
+ else
+ warning "$script returned error code $?"
+ fi
+ else
+ error "Unable to execute $script"
+ fi
+ done
fi
db_get pkgsel/include
Index: debian/pkgsel.dirs
===================================================================
--- debian/pkgsel.dirs (revision 0)
+++ debian/pkgsel.dirs (revision 0)
@@ -0,0 +1 @@
+usr/lib/pre-pkgsel.d
Index: debian/changelog
===================================================================
--- debian/changelog (revision 49858)
+++ debian/changelog (working copy)
@@ -1,3 +1,9 @@
+pkgsel (0.16) UNRELEASED; urgency=low
+
+ * Add support for a /usr/lib/pre-pkgsel.d run-parts syle directory
+
+ -- dann frazier <dannf@debian.org> Fri, 19 Oct 2007 23:31:05 -0600
+
pkgsel (0.15) unstable; urgency=low
[ Frans Pop ]
Index: debian/rules
===================================================================
--- debian/rules (revision 49858)
+++ debian/rules (working copy)
@@ -12,6 +12,8 @@
dh_testdir
dh_testroot
dh_clean -k
+ dh_installdirs
+ install -m755 popcon debian/pkgsel/usr/lib/pre-pkgsel.d/10popcon
dh_install
binary-indep: build install
Index: popcon
===================================================================
--- popcon (revision 0)
+++ popcon (revision 0)
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+# get debconf-apt-progress config, which will make it run properly later
+config=$(chroot /target debconf-apt-progress --config| sed "s/$/;/")
+
+# Install popularity-contest but remove it if the user decides not to
+# participate.
+if in-target sh -c "$config debconf-apt-progress --from 1 --to 5 --logstderr -- apt-get -o APT::Install-Recommends=false -q -y -f install popularity-contest"; then
+ if ! grep -q '^PARTICIPATE=\"*yes\"*' /target/etc/popularity-contest.conf; then
+ in-target dpkg --purge popularity-contest
+ fi
+fi
Property changes on: popcon
___________________________________________________________________
Name: svn:executable
+ *
Reply to: