Bug 172491

Summary: tetex-font-cm-lgc - package scripts are using wrong config file
Product: [Fedora] Fedora Reporter: Michal Jaegermann <michal>
Component: tetex-font-cm-lgcAssignee: Sarantis Paskalis <paskalis>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: extras-qa
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-11-06 17:28:05 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:
Bug Depends On: 172507    
Bug Blocks:    

Description Michal Jaegermann 2005-11-05 07:09:38 UTC
Description of problem:

%pre and %post scripts need to make sure that updmap.cfg is the one
which is listed by 'texconfig-sys conf' on the original installation
and which is marked as %config by rpm.  Otherwise they create a new,
independent, updmap.cfg in some directory which depends on changeable
ordering in $TEXFONTMAPS variable.

In other words a postinstall scriptlet should be like this:

/usr/bin/texhash
if [ "$1" = "1" ]; then
  /usr/bin/updmap-sys  --cnffile /usr/share/texmf/web2c/updmap.cfg \
     --quiet --nohash --enable Map=cm-lgc.map
fi

and postuninstall one

if [ "$1" = "0" ]; then
  /usr/bin/updmap-sys --cnffile /usr/share/texmf/web2c/updmap.cfg \
     --quiet --nohash --disable cm-lgc.map
fi
/usr/bin/texhash

Version-Release number of selected component (if applicable):
tetex-font-cm-lgc-0.5-5.fc5 but this equally applies to
tetex-font-cm-lgc-0.5-5.fc4

How reproducible:
always and creating updmap.sys is messing up a system as the first found
updmap.sys is used so cleaning that up requires not only removing such
extra configuration files and rerunnig, with a correct configuration
file, updmap-sys for all extra packages with configuration written in
a "wrong" places.  Nasty and I do not see a good way to make that automatic.

Comment 1 Sarantis Paskalis 2005-11-05 15:41:50 UTC
I believe this is a bug in tetex.  texconfig-sys conf specifies
TEXMFSYSCONFIG=/usr/share/texmf-config, and that is where updmap.cfg should be
located.  The marking of /usr/share/texmf/web2c/updmap.cfg as config is an rpm
specific thing which should also be changed.

I opened a bug against tetex (bug #172507) and will wait to see the reaction
before closing this.


Comment 2 Michal Jaegermann 2005-11-05 17:19:03 UTC
I am afraid that regardless if bug #172507 is indeed bug or not you have to
deal with a buggy software from time to time.  The problem is that you have
simple ways and ready options to work around this bug but you are refusing
to do that.  This puts this bug squarely in your lap as even if things get
fixed in other ways there will be buggy systems around for quite some time.

If you want to play it safe then you should modify your scripts in this
way:

/usr/bin/texhash
cnffile="$(texconfig-sys conf | grep updmap.cfg)"
if [ "$1" = "1" ]; then
  /usr/bin/updmap-sys  --cnffile ${cnffile} \
     --quiet --nohash --enable Map=cm-lgc.map
fi

I agree that a behaviour of updmap-sys is buggy and what it does in
a modified script should be a default behaviour.  No matter what it should not
quietly change how a system is configured; but before it gets fixed, if ever, 
there is no point of compounding the bug especially if you have trivial means
to alleviate its presence.

Comment 3 Sarantis Paskalis 2005-11-06 17:28:05 UTC
Given the discussion in bug #172507, it looks like an interim solution could be
to use a run-time configuration file.  It seems also safe both for systems which
do and do not have tetex-font-cm-lgc installed.

I will update the spec file as suggested in comment #2.

Thanks