Hi Ohura, On Tue, Mar 29, 2005 at 12:23:59AM +0900, OHURA Makoto wrote: > From: Steve Langasek <[EMAIL PROTECTED]> > Subject: Bug#299762: jadetex: Does not preserve user changes upon upgrade > Date: Sun, 27 Mar 2005 05:37:56 -0800 > > This means that if /etc/texmf/fmt.d/40jadetex.cnf has been removed, which is > > a valid state for a conffile to be in, upgrades of the package will fail. > > Is this the desired behavior? If not, should this "elif" also be removed > > from the script, or should 40jadetex.cnf be restored IFF it's missing (in > > which case, it should not be a conffile)?
> I think this is not desired, right? I should remove this > 'elif' section. Yes, I believe so. Please find attached a patch which addresses several issues with the previous patch -- in addition to the 'elif' problem, Frank's patch also did not correctly mark the new file as a conffile. -- Steve Langasek postmodern programmer
diff -u jadetex-3.13/debian/postinst jadetex-3.13/debian/postinst --- jadetex-3.13/debian/postinst +++ jadetex-3.13/debian/postinst @@ -62,17 +62,9 @@ warn "If you wish to use JadeTeX, you will have to create the dump manually" warn "or else purge then reinstall this package to restore default configuration." return 0 - elif [ ! -f ${FMTCNF} ]; then - warn "$FMTCNF is missing but should be there; report this bug please" - return 1 - elif ! grep -qw "^$fmt" ${FMTCNF}; then - warn "$FMTCNF doesn't contain '$fmt', skipping memory dump" - warn "If you wish to use JadeTeX, you will have to create the dump manually" - warn "or else purge then reinstall this package to restore default configuration." - return 0 else - log "running 'fmtutil --cnffile ${FMTCNF} --byfmt $fmt'..." - if ! fmtutil --cnffile ${FMTCNF} --byfmt $fmt >> $MYTMPFILE; then + log "running 'fmtutil --byfmt $fmt'..." + if ! fmtutil --byfmt $fmt >> $MYTMPFILE; then warn "ERROR: $fmt fmtutil failed" return 1 elif ! kpsewhich $fmt.fmt > /dev/null ; then @@ -125,30 +117,6 @@ MYTMPFILE=`mktemp -t jadetex-postinst.XXXXXX` : > $MYTMPFILE - # new fmt.d handling; we have to handle this in postinst rather - # than conffiles so that we can disable it when pkg is removed - # - # first we check if the file or any jadetex.cnf file is already there, - # if not, is there is a disabled version of the script available? - # if not, is there a globbed version of the disabled file available? - # if not, copy in the file from the template area - if [ -f ${FMTDIR}/40jadetex.cnf ]; then - : - elif ls ${FMTDIR}/*jadetex.cnf 2>/dev/null; then - FMTCNF=`ls ${FMTDIR}/*jadetex.cnf | tail -1` - elif [ -f ${FMTDIR}/40jadetex.cnf.disable ]; then - mv ${FMTDIR}/40jadetex.cnf.disable ${FMTCNF} - else - OLD=`ls -1 ${FMTDIR}/*jadetex.cnf* 2>/dev/null | tail -1` - if [ ${OLD} -a -f ${OLD} ]; then - FMTCNF=`echo $OLD | sed -e 's/.cnf.*/.cnf/'` - warn "re-enabling $FMTCNF from $OLD" - mv ${OLD} ${FMTCNF} - else - cp ${TEMPLDIR}/fmtutil.cnf ${FMTCNF} - fi - fi - update-fmtutil update-texmf diff -u jadetex-3.13/debian/changelog jadetex-3.13/debian/changelog --- jadetex-3.13/debian/changelog +++ jadetex-3.13/debian/changelog @@ -1,3 +1,12 @@ +jadetex (3.13-3.1) unstable; urgency=low + + * Non-maintainer upload. + * Make /etc/texmf/fmt.d/40jadetex.cnf a conffile, so that it stops + getting overwritten with the maintainer version on every upgrade. + (Closes: #299762.) + + -- Steve Langasek <[EMAIL PROTECTED]> Sun, 27 Mar 2005 05:26:13 -0800 + jadetex (3.13-3) unstable; urgency=low * New Maintainer. (Closes: #288204) diff -u jadetex-3.13/debian/rules jadetex-3.13/debian/rules --- jadetex-3.13/debian/rules +++ jadetex-3.13/debian/rules @@ -9,7 +9,7 @@ docdir := $(prefix)/usr/share/doc/$(package) mandir := $(prefix)/usr/share/man texdir := $(prefix)/usr/share/texmf/tex/$(package) -templdir := $(texdir)/config-templates +fmtdir := $(prefix)/etc/texmf/fmt.d confdir := $(prefix)/etc/texmf/$(package) texmfdir := $(prefix)/etc/texmf/texmf.d @@ -51,7 +51,7 @@ rm -rf $(prefix) $(make_dir) $(bindir) $(docdir) $(mandir)/man1 \ - $(texdir)/base $(confdir) $(templdir) $(texmfdir) + $(texdir)/base $(confdir) $(fmtdir) $(texmfdir) # conffile handling ln -sf /etc/texmf/jadetex $(texdir)/config @@ -62,9 +62,10 @@ echo $(subst $(prefix),,$(confdir))/jadetex.ini >> debian/conffiles echo $(subst $(prefix),,$(confdir))/pdfjadetex.ini >> debian/conffiles echo $(subst $(prefix),,$(texmfdir))/96JadeTeX.cnf >> debian/conffiles + echo $(subst $(prefix),,$(fmtdir))/40jadetex.cnf >> debian/conffiles # the fmtutil snippet is managed in the postinst - $(install_file) debian/fmtutil.cnf $(templdir)/ + $(install_file) debian/fmtutil.cnf $(fmtdir)/40jadetex.cnf $(install_file) jadetex.1 pdfjadetex.1 $(mandir)/man1/
signature.asc
Description: Digital signature