Bug 203697 - Change of behaviour breaks psset
Summary: Change of behaviour breaks psset
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: a2ps
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Depends On: 203692
Blocks: 209613
TreeView+ depends on / blocked
 
Reported: 2006-08-23 09:29 UTC by Bastien Nocera
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-10-19 18:41:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Bastien Nocera 2006-08-23 09:29:25 UTC
+++ 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..|
00000005

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

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

-- Additional comment from pmachata 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.

Comment 1 Tim Waugh 2006-08-23 10:06:15 UTC
So no a2ps change needed?

Comment 2 Bastien Nocera 2006-08-23 11:07:26 UTC
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 4 RHEL Program Management 2007-10-19 18:41:42 UTC
This bug is filed against RHEL 3, which is in maintenance phase.
During the maintenance phase, only security errata and select mission
critical bug fixes will be released for enterprise products. Since
this bug does not meet that criteria, it is now being closed.
 
For more information of the RHEL errata support policy, please visit:
http://www.redhat.com/security/updates/errata/
 
If you feel this bug is indeed mission critical, please contact your
support representative. You may be asked to provide detailed
information on how this bug is affecting you.


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