On Mon, Aug 16, 2010 at 23:15:34 +0200, Per Andersson wrote: > --- uboot-envtools-20081215.orig/debian/uboot-envtools.postrm > +++ uboot-envtools-20081215/debian/uboot-envtools.postrm > @@ -0,0 +1,9 @@ > +#!/bin/sh > + > +set -e > + > +. /usr/share/debconf/confmodule > + > +rm -f /etc/fw_env.config > + > +#DEBHELPER#
postrm can't rely on debconf being installed. dh_installdebconf's snippet already handles this correctly, so you should remove the inclusion of confmodule here. > only in patch2: > unchanged: > --- uboot-envtools-20081215.orig/debian/uboot-envtools.postinst > +++ uboot-envtools-20081215/debian/uboot-envtools.postinst > @@ -0,0 +1,51 @@ > +#!/bin/sh > + > +set -e > + > +. /usr/share/debconf/confmodule > + > +[ ! -f /etc/fw_env.config ] || exit 0 # bail if already configured > + > +db_get uboot-envtools/machine || true > +machine="$RET" > + > +if [ "$machine" = "Automatic" ]; then > + machine="$(sed -n '/^Hardware/ {s/^Hardware\s*:\s*//;p}' /proc/cpuinfo)" > +fi > + > +case "$machine" in > + "Kurobox Pro" | "Buffalo/Revogear Kurobox Pro") > + file="kurobox_pro.config" > + ;; > + "Linkstation Pro Live" | "Buffalo Linkstation Pro/Live") > + file="linkstation_pro_live.config" > + ;; > + "Linkstation 2") > + file="lsmipsel.config" > + ;; > + "Linkstation HG") > + file="lsppchg.config" > + ;; > + "Openmoko Neo 1973 (GTA01)" | "GTA01") > + file="openmoko_gta01.config" > + ;; > + "Openmoko FreeRunner (GTA02)" | "GTA02") > + file="openmoko_gta02.config" > + ;; > + "QNAP TS-101") > + file="qnap_ts101.config" > + ;; > + "QNAP TS-109/TS-209") > + file="qnap_ts109-209.config" > + ;; > + "QNAP TS-119/TS-219") > + file="qnap_ts119-219.config" > + ;; > + *) # Do not configure > + exit 0 > + ;; Why is this not done in .config, where you can set the default choice before asking the question, instead of having an "automatic" choice which just defers this? > +esac > + > +cp "/usr/share/doc/uboot-envtools/examples/$file" /etc/fw_env.config > + > +#DEBHELPER# > only in patch2: > unchanged: > --- uboot-envtools-20081215.orig/debian/uboot-envtools.config > +++ uboot-envtools-20081215/debian/uboot-envtools.config > @@ -0,0 +1,13 @@ > +#!/bin/sh > + > +set -e > + > +. /usr/share/debconf/confmodule > + > +[ ! -f /etc/fw_env.config ] || exit 0 # bail if already configured > + > +# select machine/file > +db_input low uboot-envtools/machine || true > +db_go || true > + > +exit 0 [...] Cheers, Julien
signature.asc
Description: Digital signature