United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6256798 : error message at rpm uninstall, deleted /etc/mailcap

Details
Type:
Bug
Submit Date:
2005-04-18
Status:
Resolved
Updated Date:
2010-04-04
Project Name:
JDK
Resolved Date:
2006-11-20
Component:
install
OS:
linux
Sub-Component:
install
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.2
Fixed Versions:
1.4.2_14 (b01)

Related Reports

Sub Tasks

Description
FULL PRODUCT VERSION :
java version "1.4.2_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_07-b05)
Java HotSpot(TM) Client VM (build 1.4.2_07-b05, mixed mode)
But it also happens with
java version "1.4.2_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)


ADDITIONAL OS VERSION INFORMATION :
Linux hpme 2.6.8-24.11-smp #1 SMP Fri Jan 14 13:01:26 UTC 2005 i686 i686 i386 GNU/Linux

EXTRA RELEVANT SYSTEM CONFIGURATION :
not relevant

A DESCRIPTION OF THE PROBLEM :
The rpm postuninstall scriptlet contains a typo:
if [ -w $MAILCAP_FILE ]; then
  jGrep=`grep -n ${MIME_TYPE} $MAILCAP_FILE`
  if [ -n "$jGrep" ]; then
    MC_TEXT=`grep -v ${MIME_TYPE} < $MAILCAP_FILE | grep -v ${MC_COMMENT}"`
    echo -e "${MC_TEXT}" > ${MAILCAP_FILE}
  fi
else
...
The 4th line contains a double quote which causes an error message on screen
during uninstall or upgrade from 1.4.2_05 (since the posuninstall from that
version is executed which also contains this bug). Therefore $MC_TEXT is empty
and $MAIL_CAP is truncated to empty file in line 5.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
issue an rpm uninstall:
hpme:~ # rpm -e j2sdk
You also get this error if you upgrade from 1.4.2_05.


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I expect to not loose my /etc/mailcap and to not see any error message
ACTUAL -
/etc/mailcap is truncated, contains only one byte 0x0a

ERROR MESSAGES/STACK TRACES THAT OCCUR :
/var/tmp/rpm-tmp.62955: command substitution: line 62: unexpected EOF while looking for matching `"'
/var/tmp/rpm-tmp.62955: command substitution: line 63: syntax error: unexpected end of file


REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
make a copy of /etc/mailcap before uninstall/upgrade,
after uninstall/upgrade copy back
###@###.### 2005-04-18 19:30:12 GMT

                                    

Comments
EVALUATION

This bug was accidentally backported with some other changes from Tiger back in the December 2003/January 2004 timeframe.  Although it's an easy fix, CTE can decide if they think it's worth it to fix at this point.

###@###.### 2005-04-19 15:17:27 GMT
                                     
2005-04-19



Hardware and Software, Engineered to Work Together