Bug 187884 - /usr/share/a2ps/afm/make_fonts_map.sh is buggy - calls sort wrong
Summary: /usr/share/a2ps/afm/make_fonts_map.sh is buggy - calls sort wrong
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: a2ps
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-04-04 09:47 UTC by Peter Bieringer
Modified: 2007-11-30 22:11 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2006-04-04 13:02:59 UTC


Attachments (Terms of Use)

Description Peter Bieringer 2006-04-04 09:47:15 UTC
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 13:02:59 UTC
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.