[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: uboot-envtools and uboot-mkimage



On Tue, Aug 17, 2010 at 12:04 AM, Julien Cristau <jcristau@debian.org> wrote:
> 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.

Ok.


>> 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?

Do you mean that I should guess the Hardware, if possible, and
then let the default selection in the list be whatever was guessed?


--
Per


Reply to: