Bug 209613 - Change of behaviour breaks psset
Change of behaviour breaks psset
Product: Fedora
Classification: Fedora
Component: a2ps (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Depends On: 203697
Blocks: FC6Update
  Show dependency treegraph
Reported: 2006-10-06 08:37 EDT by Tim Waugh
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 4.13b-57.fc6.3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-10-31 05:27:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
a2ps-psset.patch (471 bytes, patch)
2006-10-06 08:47 EDT, Tim Waugh
no flags Details | Diff

  None (edit)
Description Tim Waugh 2006-10-06 08:37:48 EDT
+++ This bug was initially created as a clone of Bug #203697 +++

+++ This bug was initially created as a clone of Bug #203339 +++

psset will generate broken PS output when used on RHEL4.

1. Run
ls | a2ps -o - | psset -t > test.ps
2. Notice the broken ps on RHEL4 (where it works on RHEL3)

The bug (control characters where there should be text) is due to a change in
sed's behaviour.

RHEL3, sed-4.0.7-3:
$ echo ''|sed -e ' i\\co' | hexdump -C
00000000  5c 63 6f 0a 0a                                    |\co..|

RHEL4, sed-4.1.2-4:
$ echo ''|sed -e ' i\\co' | hexdump -C
00000000  0f 0a 0a                                          |...|

RHEL4, with RHEL3's sed:
$ echo ''|./sed -e ' i\\co' | hexdump -C
00000000  5c 63 6f 0a 0a                                    |\co..|

-- Additional comment from pmachata@redhat.com on 2006-08-22 13:36 EST --
Hmm... yes, there indeed is a change in behavior.  However it seems to me that
the new version is correct in handling backslashes, and that the right way to
write the sequence '\co' is with 'i\\\co'.  First '\' is the delimiter (which
can be missing, but if it's here, it has to be the delimiter), following '\\' is
escaped backslash, and then 'co'.  In contrast, 'i\\co' interprets \c as escape
and turns 'o' into control character.
If you retarget this bug against EL3, I will adjust the behavior of sed there.

-- Additional comment from twaugh@redhat.com on 2006-08-23 06:06 EST --
So no a2ps change needed?

-- Additional comment from bnocera@redhat.com on 2006-08-23 07:07 EST --
No, psset is broken in both RHEL3 and RHEL4, wrt. its usage of sed. Just that it
doesn't look like it on RHEL3 because sed is misbehaving.
Comment 1 Tim Waugh 2006-10-06 08:47:08 EDT
Created attachment 137911 [details]
Comment 2 Tim Waugh 2006-10-17 08:18:47 EDT
Fixed in CVS for devel (4.13b-58).
Comment 3 Tim Waugh 2006-10-17 08:59:58 EDT
Fixed in CVS for FC-6 (4.13b-57.1 built).
Comment 4 Fedora Update System 2006-10-30 16:37:25 EST
Fixed in update: a2ps-4.13b-57.fc6.3

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