Hi,

I'm attaching the debdiff with a patch that fixes the issue.  It's
quite simple, it adds a function is_initial_configuration that checks
the parameters mentioned in the previous update, and then uses that
function to guard the code that touches the symlinks.

The is_initial_configuration function is inspired in the one included
in the openldap package.
http://sources.debian.net/src/openldap/2.4.40-2/debian/slapd.scripts-common

These are the tests I performed to verify that this did the right
thing (sorry about the Spanish messages, I thought I had used LANG=C,
but somehow it didn't take):

***
Normal installation, doesn't recreate the symlink:

root@penelope:# rm /etc/fonts/conf.d/70-no-bitmaps.conf
root@penelope:# sudo dpkg -i fontconfig_2.11.0-6.3_amd64.deb
fontconfig-config_2.11.0-6.3_all.deb
(Leyendo la base de datos ... 284248 ficheros o directorios instalados
actualmente.)
Preparing to unpaock fontconfig_2.11.0-6.3_amd64.deb ...
Unpacking fontconfig (2.11.0-6.3) over (2.11.0-6.3) ...
Preparing to unpack fontconfig-config_2.11.0-6.3_all.deb ...
Unpacking fontconfig-config (2.11.0-6.3) over (2.11.0-6.3) ...
Configurando fontconfig-config (2.11.0-6.3) ...
Configurando fontconfig (2.11.0-6.3) ...
Regenerating fonts cache... done.
Processing triggers for man-db (2.7.0.2-3) ...
root@penelope:# ls -l /etc/fonts/conf.d/70-no-bitmaps.conf
ls: no se puede acceder a /etc/fonts/conf.d/70-no-bitmaps.conf: No
existe el fichero o el directorio
***
Reconfiguring, recreates the symlink:

root@penelope:# dpkg-reconfigure fontconfig-config
root@penelope:# ls -l /etc/fonts/conf.d/70-no-bitmaps.conf
lrwxrwxrwx 1 root root 51 nov 23 14:17
/etc/fonts/conf.d/70-no-bitmaps.conf ->
/usr/share/fontconfig/conf.avail/70-no-bitmaps.conf

root@penelope:# sudo dpkg -i fontconfig_2.11.0-6.3_amd64.deb
fontconfig-config_2.11.0-6.3_all.deb
(Leyendo la base de datos ... 284248 ficheros o directorios instalados
actualmente.)
Preparing to unpack fontconfig_2.11.0-6.3_amd64.deb ...
Unpacking fontconfig (2.11.0-6.3) over (2.11.0-6.3) ...
Preparing to unpack fontconfig-config_2.11.0-6.3_all.deb ...
Unpacking fontconfig-config (2.11.0-6.3) over (2.11.0-6.3) ...
Configurando fontconfig-config (2.11.0-6.3) ...
Configurando fontconfig (2.11.0-6.3) ...
Regenerating fonts cache... done.
Processing triggers for man-db (2.7.0.2-3) ...
root@penelope:# ls -l /etc/fonts/conf.d/70-no-bitmaps.conf
lrwxrwxrwx 1 root root 51 nov 23 14:17
/etc/fonts/conf.d/70-no-bitmaps.conf ->
/usr/share/fontconfig/conf.avail/70-no-bitmaps.conf
***
New installation (on a pbuilder):
root@penelope:/# apt-cache policy fontconfig-config
fontconfig-config:
  Installed: (none)
  Candidate: 2.11.0-6.2
  Version table:
     2.11.0-6.2 0
        500 http://ftp.us.debian.org/debian/ sid/main amd64 Packages

root@penelope:/# ls -l /etc/fonts/conf.d/70-no-bitmaps.conf
ls: cannot access /etc/fonts/conf.d/70-no-bitmaps.conf: No such file
or directory

root@penelope:/# dpkg -i libfontconfig1_2.11.0-6.3_amd64.deb
fontconfig-config_2.11.0-6.3_all.deb fontconfig_2.11.0-6.3_amd64.deb
Selecting previously unselected package libfontconfig1:amd64.
(Reading database ... 12043 files and directories currently installed.)
Preparing to unpack libfontconfig1_2.11.0-6.3_amd64.deb ...
Unpacking libfontconfig1:amd64 (2.11.0-6.3) ...
Selecting previously unselected package fontconfig-config.
Preparing to unpack fontconfig-config_2.11.0-6.3_all.deb ...
Unpacking fontconfig-config (2.11.0-6.3) ...
Selecting previously unselected package fontconfig.
Preparing to unpack fontconfig_2.11.0-6.3_amd64.deb ...
Unpacking fontconfig (2.11.0-6.3) ...
Setting up fontconfig-config (2.11.0-6.3) ...
Setting up libfontconfig1:amd64 (2.11.0-6.3) ...
Setting up fontconfig (2.11.0-6.3) ...
Regenerating fonts cache... done.
Processing triggers for libc-bin (2.19-13) ...

root@penelope:/# ls -l /etc/fonts/conf.d/70-no-bitmaps.conf
lrwxrwxrwx 1 root root 51 Nov 23 13:34
/etc/fonts/conf.d/70-no-bitmaps.conf ->
/usr/share/fontconfig/conf.avail/70-no-bitmaps.conf
***

I believe all cases are accounted for and that this is the right fix.
Please let me know if I'm forgetting to consider some case.

Thanks,
Marga

Attachment: fontconfig-debdiff
Description: Binary data

Reply via email to