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

Bug#208408: tetex-bin: No hyphenation patterns were loaded



Atsuhito Kohda <kohda@pm.tokushima-u.ac.jp> schrieb:

> Well, I tested a bit and got the following patch.

I didn't test, just read the code.

> But I didn't check every case so I'm willing to
> get any advice or comment.  Especially, I'm not sure
> that if-clause is sufficient or not.
[...]
> +if [ "$1" != "reconfigure" -a -n "$2" ]; then
> +# to preserve previous answers
> +    if dpkg --compare-versions "$2" le 2.0.2-4.3.2; then
> +	db_fset tetex-bin/hyphen seen false

Is this really necessary? I thought that upon dpkg-reconfigure every
question is asked again?

> +	db_get tetex-bin/hyphen
> +	if [ -z "$RET" ]; then
> +	    DEFAULT_ANS="$DEFAULTS"
> +	else
> +	    DEFAULT_ANS="$DEFAULTS, $RET"
> +	fi
> +	db_set tetex-bin/hyphen "$DEFAULT_ANS"
> +    fi
> +else
> +# in case fresh install

Hm, upon upgrade the config script is called with "configure", isn't it?
So many users will have answered the hyphen question once; shouldn't we
also look for their former choices and add them to DEFAULT_ANS, just as
with reconfigure?

>  db_input medium tetex-bin/hyphen || true
> +db_fset tetex-bin/hyphen seen true
>  db_go
>  fi
>
> Note: 
> - "Default" entry in templates file seems to do nothing practically?
>   It needed to do something like; db_set tetex-bin/hyphen "$DEFAULT_ANS"

It ticks the respective choices in the dialog, doesn't it? So when you
just hit enter, you've selected the default.

> - once we did "db_fset tetex-bin/hyphen seen false" then
>   "db_fset tetex-bin/hyphen seen true" seemed necessary
>   but I'm not sure where is the best place to call it.

Are you sure this is necessary? The dialog will be shown (possibly
again) exactly because we set the flag to false. But after it has been
shown, the flag will be true because it _has_ been seen again. At least
that's what I expect, didn't check.

Hm, I really should test this instead just asking a lot of
questions. However, it's a nice evening and my wife is sitting in the
living room, \dots

Bye, Frank
-- 
Frank Küster, Biozentrum der Univ. Basel
Abt. Biophysikalische Chemie




Reply to: