Bug 172268

Summary: tetex-font-cm-lgc - bad %post and %postun scripts
Product: [Fedora] Fedora Reporter: Michal Jaegermann <michal>
Component: tetex-font-cm-lgcAssignee: Sarantis Paskalis <paskalis>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: extras-qa
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: tetex-font-cm-lgc-0.5.4.fc4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-11-02 11:42:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Jaegermann 2005-11-02 05:19:03 UTC
Description of problem:

In %post script of tetex-font-cm-lgc I see:

/usr/bin/updmap-sys --quiet --nohash --outputdir %{texmf}/dvips/config \
   --enable Map cm-lgc.map

and similar, but with '--disable', for %postun.  This actually is a bad idea
as you have no clue where fonts map really reside. TEXMFSYSVAR may be set
and point somewhere else.

These are fragments of a 'texconfig-sys conf' output from a real system:

============================= font map files =============================
psfonts.map: /usr/share/texmf-var/fonts/map/dvips/updmap/psfonts.map
pdftex.map: /usr/share/texmf-var/fonts/map/dvips/updmap/pdftex.map
ps2pk.map: /usr/share/texmf-var/fonts/map/dvips/updmap/ps2pk.map
dvipdfm.map: /usr/share/texmf-var/fonts/map/dvipdfm/updmap/dvipdfm.map
.....
TEXMFSYSVAR=/usr/share/texmf-var

Oops! Nothing works after an installation was presumably finished.

AFAICS just running '/usr/bin/updmap-sys --quiet' should be enough to properly
rebuild map files in whatever directories they happen to be located.  This
makes new fonts findable for dvips, pdf(la)tex and dvipdfm.  If you want to be
specific with '--enable/--disable' then so be it; although I am not so sure 
what that actually buys.

I do not know why '--nohash' is there?  If you are or removing files from
your TeX installation tree you actually _want_ to run 'texhash' so corresponding
lists will reflect an actual state.

Version-Release number of selected component (if applicable):
tetex-font-cm-lgc-0.5-3.fc4

Additional info:
I did not check how corresponding scripts look in other 'tetex-font...' packages.

Comment 1 Sarantis Paskalis 2005-11-02 11:42:49 UTC
Explicit outputdirs removed from %post and %postun.

The --enable and --disable options are mandatory when installing/removing the
map,  because change to the updmap.cfg is required.  Without them, the
updmap.cfg is not changed and the changes are not propagated to psfonts.map,
pdftex.map, etc.

The --nohash switch is needed to not run texhash twice.  My half-baked approach
to clean up the spec file removed the texhash command before updmap-sys, but
keeping the nohash switch.  I discovered that running texhash before updmap-sys
is necessary when installing a map, because updmap-sys uses that information to
locate the map file.  So, the correct procedure (in %post) is to run texhash,
and then updmap-sys.  Running updmap-sys without --nohash runs texhash for a
second time, when no new files are added (only the psfonts.map, pdftex.map, etc
are _changed_).

(also fixed tetex-font-kerkis)

tetex-font-cm-lgc-0.5.4.fc4 just built on the buildsystem.