Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6256798

error message at rpm uninstall, deleted /etc/mailcap

XMLWordPrintable

    • b01
    • x86
    • linux
    • Not verified

      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

            raginip Ragini Prasad (Inactive)
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: