On Sat, 2018-08-11 at 10:07 +0100, Chris Lamb wrote:

> https://salsa.debian.org/lintian/lintian/commit/1fe8f33d7ffaab74c47d5ed61c56d8a8a0abb693


A few fixes are needed:

s/which comes/which come/

s/If you are using dh_installxfonts/If you are using debhelper/

The code unconditionally detects update-fonts-scale but the
dh_installxfonts code only inserts that conditionally (see below).

The code does not detect update-fonts-alias being missing but
dh_installxfonts conditionally inserts calls to that (see below).

One of the tag descriptions mentions an update-fonts-utils script,
but that does not exist:

$ find /usr/sbin/update-fonts-*

Here is most of the code from dh_installxfonts:

foreach my $package (@{$dh{DOPACKAGES}}) {
        my $tmp=tmpdir($package);

        # Find all font directories in the package build directory.
        my @fontdirs;
        foreach my $parentdir ("$tmp/usr/share/fonts/X11/") {
                opendir(DIR, $parentdir) || next;
                @fontdirs = grep { -d "$parentdir/$_" && !/^\./ } (readdir DIR);
                closedir DIR;

        if (@fontdirs) {
                # Figure out what commands the postinst and postrm will need 
                # to call.
                my @cmds;
                my @cmds_postinst;
                my @cmds_postrm;
                # Sort items for reproducible binary package contents.
                foreach my $f (sort @fontdirs) {
                        # This must come before update-fonts-dir.
                        push @cmds, "update-fonts-scale $f"
                                if -f "$tmp/etc/X11/fonts/$f/$package.scale";
                        push @cmds, "update-fonts-dir --x11r7-layout $f";
                        if (-f "$tmp/etc/X11/fonts/$f/$package.alias") {
                                push @cmds_postinst, "update-fonts-alias 
--include /etc/X11/fonts/$f/$package.alias $f";
                                push @cmds_postrm, "update-fonts-alias 
--exclude /etc/X11/fonts/$f/$package.alias $f";

                autoscript($package, "postinst", "postinst-xfonts",
                        { 'CMDS' => join(";", @cmds, @cmds_postinst) });
                autoscript($package, "postrm", "postrm-xfonts",
                        { 'CMDS' => join(";", @cmds, @cmds_postrm) });

                if (@cmds_postrm) {
                        addsubstvar($package, "misc:Depends", "xfonts-utils", 
">= 1:7.5+2");
                } else {
                        addsubstvar($package, "misc:Depends", "xfonts-utils");



Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to