From: Ian Jackson Date: Wed, 25 Jan 2012 23:22:39 +0000 (+0000) Subject: support --always-reprocess X-Git-Tag: debian/1.3~1 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=xfonts-traditional.git;a=commitdiff_plain;h=d4b1d0b116b859bd35b241d0983753935a98858c support --always-reprocess --- diff --git a/debian/changelog b/debian/changelog index ed7308c..b4e0041 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ xfonts-traditional (1.3) unstable; urgency=low * Process multiple fonts in parallel. * General improvements to handling of errors and unprocessed fonts. * Fix typo in short Description. Closes: #657397. + * New --always-reprocess option to update-xfonts-traditional. -- diff --git a/update-xfonts-traditional b/update-xfonts-traditional index 63e9040..895be6d 100755 --- a/update-xfonts-traditional +++ b/update-xfonts-traditional @@ -24,6 +24,7 @@ our $reportfh; our $foundryinfo; our %props; our $tolerate_bad_fonts=1; +our $always_reprocess; our $wanted_parallel; sub reportloaded { @@ -287,14 +288,17 @@ sub processfontdir ($) { return; } my $changed = 0; - my $olddone = do "$fontdir/$donefile"; - if (!$olddone) { - die "$fontdir $! $@ " unless $!==&ENOENT; - } elsif ($olddone->{''} ne $foundryinfo) { - our $repro_reported; - print $reportfh "reprocessing fonts (rules updated)\n" or die $! - unless $repro_reported++; - $olddone = undef; + my $olddone; + if (!$always_reprocess) { + $olddone = do "$fontdir/$donefile"; + if (!$olddone) { + die "$fontdir $! $@ " unless $!==&ENOENT; + } elsif ($olddone->{''} ne $foundryinfo) { + our $repro_reported; + print $reportfh "reprocessing fonts (rules updated)\n" or die $! + unless $repro_reported++; + $olddone = undef; + } } if (!$olddone) { $olddone = { }; @@ -453,6 +457,7 @@ our (@options)=( 'share-dir=s' => \$sharedir, 'verbose|v+' => \$verbose, 'j|parallel=i' => \$wanted_parallel, + 'always-reprocess!' => \$always_reprocess, 'tolerate-bad-fonts!' => \$tolerate_bad_fonts, ); diff --git a/update-xfonts-traditional.8 b/update-xfonts-traditional.8 index 5da104c..420d55f 100644 --- a/update-xfonts-traditional.8 +++ b/update-xfonts-traditional.8 @@ -61,6 +61,10 @@ Use up to .I cpus cores for processing fonts. The default is all the cpus available. .TP +\fB--always-reprocess +When scanning font directories, always reprocess all the fonts, +regardless of whether we think they have been done already. +.TP \fB--no-tolerate-bad-fonts Treat bad input fonts (eg, ones for which pcf2bdf crashes, or ones with other problems) as a fatal error. Normally they just produce