Bug 1121987 - lost of custom config files on removal (and maybe also downgrade)
Summary: lost of custom config files on removal (and maybe also downgrade)
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: java-1.7.0-openjdk
Version: 7.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: jiri vanek
QA Contact: Lukas Zachar
Depends On:
Blocks: 1297579 1313485
TreeView+ depends on / blocked
Reported: 2014-07-22 09:39 UTC by jiri vanek
Modified: 2016-06-06 14:08 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-06-06 14:08:04 UTC

Attachments (Terms of Use)

Description jiri vanek 2014-07-22 09:39:04 UTC
As RPMS do have LUA to copy config files, they have also rm -rf in post

This can be really inconvenient, if there are already some rpmnew/rpmsave files. If those are in this directory, the rm -rf should not be called. 

Originally reported here:

The original reporter is requesting also enlarging of the list of config files and is also complaining about downgrade. However downgrade seems to work ...

Comment 2 Severin Gehwolf 2014-07-22 11:12:57 UTC
Also consider the following:

$ rpm -qa | grep java-1.7.0-openjdk

$ sudo rpm -e -vvv --nodeps java-1.7.0-openjdk-headless
D: %postun(java-1.7.0-openjdk-headless-1: execv(/bin/sh) pid 17074
+ alternatives --remove java /usr/lib/jvm/java-1.7.0-openjdk-
+ alternatives --remove jre_openjdk /usr/lib/jvm/java-1.7.0-openjdk-
+ alternatives --remove jre_1.7.0 /usr/lib/jvm/java-1.7.0-openjdk-
+ alternatives --remove jre_1.7.0_openjdk /usr/lib/jvm/jre-1.7.0-openjdk-
+ '[' -e /usr/lib/jvm/java-1.7.0-openjdk- ']'
+ rm -rf /usr/lib/jvm/java-1.7.0-openjdk-
+ exit 0

$ rpm -V java-1.7.0-openjdk-devel

I'm aware that the --nodeps option is fairly dangerous, but it's still somewhat unexpected behavour to do in a package's %postun

Comment 4 jiri vanek 2016-01-13 13:10:25 UTC
As openjdk7 is already using the luascripts, and rm -rf is already removed from 7.3 specfiles, then  ACK as we already have openjdk7 erratum.

Comment 6 jiri vanek 2016-06-06 14:08:04 UTC
This bug should be indirectly fixed by https://bugzilla.redhat.com/show_bug.cgi?id=1296442. If it will persists in 7.3 with all components properly updated, please reposrt new bug.

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