Bug 187884 - /usr/share/a2ps/afm/make_fonts_map.sh is buggy - calls sort wrong
/usr/share/a2ps/afm/make_fonts_map.sh is buggy - calls sort wrong
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: a2ps (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-04 05:47 EDT by Peter Bieringer
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 4.13b-50
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-04-04 09:02:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Peter Bieringer 2006-04-04 05:47:15 EDT
Description of problem:

A script /usr/share/a2ps/afm/make_fonts_map.sh has assorted
bugs.  It calls "sort" in a wrong manner.

Unfortunately, this would not be detected by human, because postinstall script
of a2ps is not smart enough. I only detect the bug by checking result code of 
rpm -Uhv, which is 1 here.

spec file not smart enough:

postinstall scriptlet (using /bin/sh):
/sbin/install-info /usr/share/info/a2ps.info.gz /usr/share/info/dir
/sbin/install-info /usr/share/info/ogonkify.info.gz /usr/share/info/dir
/sbin/install-info /usr/share/info/regex.info.gz /usr/share/info/dir
(cd /usr/share/a2ps/afm;
        ./make_fonts_map.sh > /dev/null 2>&1 || /bin/true  <-- 2>&1 is bad
        if [ -f fonts.map.new ]; then
            mv fonts.map.new fonts.map
        fi
)


The real bug is located here:

echo "Sorting entries..." 1>&2
sort -u -t' ' +0 -1 fonts.map.new > fonts.map.tmp


"sort" of FC5 doesn't understand "-1" anymore, it claims about "invalid option",
but RHEL4 and FC4 doesn't.

Version-Release number of selected component (if applicable):
a2ps-4.13b-49

FC5:
coreutils-5.93-7.2

FC4:
coreutils-5.2.1-48.1
Comment 1 Tim Waugh 2006-04-04 09:02:59 EDT
Fixed in a2ps-4.13b-50 for Fedora development.  Thanks for spotting this.

Note You need to log in before you can comment on or make changes to this bug.