tags 694800 + patch pending
thanks
>>>>>  TK == Thomas Koch [2012-12-1]

TK> Hi Davide,
TK> I believe I got it.

Yes, I also think you spotted it, many thanks.

TK> Apparently there was some confusion how the trigger values are
TK> passed to the maintainer script and the following code in the
TK> postinst script might have changed over time:

Yes, it changed from 10(.1) to 11; it was introduced as a while loop,
due to a misunderstanding of mine on the trigger parameter passing
convention, therefore the shifts and the break on '' to stop the loop;
when I fixed it I followed the patch proposed in #686366, overlooking
the shifts and break.

TK> If you'd be so kind to make your Git repo public (e.g. on alioth)
TK> then I could confirm this.

I will, but I still have to sort some things out before making it public
(i.e., I would like to rewrite some history on the master branch).
Meanwhile, I know it's not of course the same thing and maybe you
already know about it, but git-import-dscs works pretty well for
packages which do not have a public repo.

TK> postinst triggered 'auctex-install-emacs24 auctex-install-emacs23 auctex-
TK> install-emacs-snapshot'

The single argument list was exactly the point I missed when I designed
the original while loop.

TK> The shifts don't trouble as long as you have only 2 emacs versions
TK> installed but the third call to shift will return error code 1 since
TK> there's no more argument left to shift.

TK> Just remove the shifts please.

Patch attached.

TK> I wonder, whether update-auctex-elisp gets called twice during the
TK> installation of auctex? Once during the configure phase and second
TK> during the trigger phase?

I think you refer to the else clause of the if [ -z
"${DEBCONF_RECONFIGURE}" ] selection, isn't it?  That clause is not for
the configure phase, is for `dpkg-reconfigure'.

-- 
Thanks, Davide
diff --git a/debian/auctex.postinst.eperl b/debian/auctex.postinst.eperl
index cde82dc..9e4fe18 100644
--- a/debian/auctex.postinst.eperl
+++ b/debian/auctex.postinst.eperl
@@ -78,18 +78,22 @@ case "${1}" in
        RUN_UPDATE_AUCTEX_ELISP=true
        for trigger in ${2}; do
            case "${trigger}" in
-               ('')
-                   break
-                   ;;
-<: #            Triggered by the Emacs install script :>//
                (auctex-install-*)
+<:              # Explicitly triggered by the Emacs install script
+                # handling a particular flavor: add that flavor to the
+                # list of flavors to be processed by update-auctex-elisp
+                # later on :>//
                    FLAVORS="${FLAVORS}${FLAVORS:+ }${trigger#auctex-install-}"
-                   shift
                    ;;
-<: #            New (La)TeX macros: need to rescan for all flavors :>//
                (/*)
+<:              # File triggered by new/updated (La)TeX macros: add a
+               # special flag to the list of flavors to be processed by
+               # update-auctex-elisp later on to signal the need to
+               # rescan for all supported flavors; FIXME: it would be
+               # better to rescan only these new/updated (La)TeX macros
+               # instead of all of them, however this is not supported by
+               # the current implementation of update-auctex-elisp :>//
                    FLAVORS="${FLAVORS}${FLAVORS:+ }<all>"
-                   shift
                    ;;
                (*)
                    echo >&2 "${PROGNAME}:" \
@@ -99,6 +103,10 @@ case "${1}" in
            esac
        done
        if fgrep '<all>' <(echo ${FLAVORS}) &>/dev/null; then
+<:      # the special flag '<all>' signals all supported flavors need to
+       # be rescanned for; update-auctex-elisp does this by default if
+       # called without arguments
+:>//
            unset FLAVORS;
        fi
        ;;
@@ -132,5 +140,6 @@ exit 0
 # end:
 #
 # LocalWords:  ePerl postinst auctex conffiles debconf fd frontend Helmut emacs
-# LocalWords:  maintainership conffile dpkg AUCTeX elisp reparse
+# LocalWords:  maintainership conffile dpkg AUCTeX elisp reparse cron
+# LocalWords:  rescan FIXME rescanned
 :>//

Reply via email to