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

Re: lmodern fonts and sarge



Hi all,

Florent Rougon <f.rougon@free.fr> wrote:

> I'll try to have a good package ready ASAP.

Well, I have the first relase ready (0.86-6 since Michael's last one
appears to be 0.86-5). As far as I know, it is well set up for all
TeX-related tasks. defoma support will be considered later.

FWIW, the most important problems I found with Michael's binary
package[1] are:
  - it Provides: lm, which should not be (I sincerely hope no
    package depends on lm); this problem is not very important;
  - it contained (at least in -4; -5 is fairly recent and I didn't look
    at it) directories under /usr/share/texmf/doc, which shouldn't
    happen since /usr/share/texmf/doc is a symlink (cf.
    http://lists.debian.org/debian-tetex-maint/2003/debian-tetex-maint-200309/msg00052.html);
  - /etc/texmf/updmap.d/10lmodern.cfg is declared as a conffile but is
    fiddled with in postrm (mv'ed to 10lmodern.bak), which is forbidden
    by Policy (cf. the end of § 10.7.3). This way is very easy but leads
    to problems. For instance, the bug hit by Frank on
    http://lists.debian.org/debian-tetex-maint/2003/debian-tetex-maint-200309/msg00070.html
    was directly caused by this: since the file was a conffile and was
    renamed to .bak on removal in postrm[2], it wasn't reinstalled later
    if one reinstalled the package because dpkg thought the *admin*
    removed the conffile (dpkg cannot know what happens in maintainer
    scripts, and this illustrates why Policy forbids having a conffile
    that is also fiddled with in the maintainer scripts). Only purge
    could make dpkg forget about it so that a reinstall would put the
    .cfg file back in place.

So, I implemented /etc/texmf/updmap.d/10lmodern.cfg as a configuration
file that is *not* a conffile. This is necessary, otherwise the file
would be left untouched on remove and the map files would contain font
declarations for fonts that are not available anymore.

I must say this was rather tricky, but I do think I got it right. I
tested at least the following operations:

1. Modification of /etc/texmf/updmap.d/10lmodern.cfg that is not a
   deletion

  dpkg -i lmodern_0.86-6_all.deb
  # The default configuration file is installed as
  # /etc/texmf/updmap.d/10lmodern.cfg, the map files have been updated,
  # etc.
  modify the config file (i.e. /etc/texmf/updmap.d/10lmodern.cfg)
  dpkg -r lmodern
  # The config file is not anymore under /etc/texmf/updmap.d/, and of
  # course the map files have been updated. FYI, it is saved under
  # /var/lib/lmodern/ (this is documented in README.Debian).
  dpkg -i lmodern_0.86-6_all.deb
  # The config file is again under /etc/texmf/updmap.d/ and our previous
  # modification has been preserved.
  dpkg -r lmodern
  # The config file is not anymore under /etc/texmf/updmap.d/, and of
  # course the map files have been updated.
  dpkg -i lmodern_0.86-7_all.deb
  # The config file is again under /etc/texmf/updmap.d/ and our previous
  # modification has been preserved.
  dpkg -r lmodern
  # The config file is not anymore under /etc/texmf/updmap.d/, and of
  # course the map files have been updated.
  dpkg -P lmodern
  # No trace of the package on the system anymore (most notably,
  # /var/lib/lmodern does not exist anymore).
  dpkg -i lmodern_0.86-7_all.deb
  # The default config file is installed as
  # /etc/texmf/updmap.d/10lmodern.cfg, the map files have been updated,
  # etc.
  dpkg -P lmodern
  # No trace of the package on the system anymore.

2. The admin deletes /etc/texmf/updmap.d/10lmodern.cfg

  dpkg -i lmodern_0.86-7_all.deb
  # The default configuration file is installed as
  # /etc/texmf/updmap.d/10lmodern.cfg, the map files have been updated,
  # etc.
  delete the config file (i.e. /etc/texmf/updmap.d/10lmodern.cfg)
  dpkg -r lmodern
  # The config file is not anymore under /etc/texmf/updmap.d/, and of
  # course the map files have been updated. FYI, it is noted under
  # /var/lib/lmodern/ that the admin explicitely deleted the config file.
  dpkg -i lmodern_0.86-7_all.deb
  # The admin's modification to the config file has been preserved
  # (i.e., there is no 10lmodern.cfg under /etc/texmf/updmap.d/).
  # Map files OK, of course (i.e., not containing the lmodern font
  # declarations).
  dpkg -r lmodern
  # The config file is still not under /etc/texmf/updmap.d/, the map
  # files are OK.
  dpkg -i lmodern_0.86-8_all.deb
  # The config file is still not under /etc/texmf/updmap.d/ (admin
  # modif [= deletion] to the config file has been preserved), the map
  # files are OK.
  dpkg -r lmodern
  # The config file is still not under /etc/texmf/updmap.d/, the map
  # files are OK.
  dpkg -P lmodern
  # No trace of the package on the system anymore (most notably,
  # /var/lib/lmodern does not exist anymore).
  dpkg -i lmodern_0.86-8_all.deb
  # The default config file is installed as
  # /etc/texmf/updmap.d/10lmodern.cfg, the map files have been updated,
  # etc.
  dpkg -P lmodern
  # No trace of the package on the system anymore.
  dpkg -i lmodern_0.86-8_all.deb
  # The default config file is installed as
  # /etc/texmf/updmap.d/10lmodern.cfg, the map files have been updated,
  # etc.
  delete the config file
  dpkg -P lmodern
  # No trace of the package on the system anymore.
  dpkg -i lmodern_0.86-9_all.deb
  # The default config file is installed as
  # /etc/texmf/updmap.d/10lmodern.cfg, the map files have been updated,
  # etc.

It should be noted that the advice given in
/usr/share/doc/tetex-bin/README.Debian.gz to rename
/etc/texmf/updmap.d/10foo.cfg to something like 10foo.bak in the same
directory is not correct because it might be (cf. Policy § 6.5, step 2)
that foo (the lmodern package in my case) is only deconfigured while the
packages it depends on are removed. The removal of tetex-base with foo
only deconfigured could not work because 10foo.cfg could still be in
/etc/texmf/updmap.d/ (since foo is only deconfigured, not purged), so
this directory could not be erased. And dpkg would want to erase it if
no other package has files in it because foo has *no* file declared to
dpkg in /etc/texmf/updmap.d/ (I have explained earlier in this message
why 10foo.cfg cannot be a conffile). And this cannot be solved by foo
declaring the directory to dpkg (and no file inside) because in that
case, the directory would be removed by dpkg when foo is removed, which
is not possible if there is still 10foo.cfg inside (which can happen if
foo is removed but not purged)!

I have extensively commented the tricky parts of the package (mostly in
the maintainer scripts), so that it is clear on every delicate point why
I made the things the way they are.

README.Debian contains informations that I hope will be useful, most
notably why I didn't include the PFM files and what to do with the
/etc/texmf/updmap.d/10lmodern.bak file left by Michael's package on
remove. In short, my package ignores it: if you don't care about the
contents of this file, you should remove it.

I also wrote a comment in my default /etc/texmf/updmap.d/10lmodern.cfg
about why /etc/texmf/dvips/psfonts.map and similar files should not be
modified directly by the admin although they are in located under /etc.
A similar text should perhaps be integrated in the manpage for
update-updmap or tetex-bin's README.Debian. Well...

Thank you for your patience if you have read so far. I hope I didn't
forget any important point.

My lmodern package can be downloaded with the following
/etc/apt/sources.list lines:

  deb http://people.via.ecp.fr/~flo/debian sid/binary-$(ARCH)/
  deb http://people.via.ecp.fr/~flo/debian sid/binary-all/
  deb-src http://people.via.ecp.fr/~flo/debian sid/source/

Sébastien, it's up to you, now! And don't forget it is a -6 revision. :)


[1] I didn't examine the source package that Michael eventually
    provided. Michael: you have provided a Debian native source package.
    This is not a very good idea except when the software that is
    packaged is specifically dedicated to Debian (cf. Policy,
    debian-mentors archives...).

[2] Granted, the few lines about update-updmap in
    /usr/share/doc/tetex-bin/README.Debian.gz can easily mislead you to
    do this way if you are not careful enough.

-- 
Florent



Reply to: