Bug 50515

Summary: Unexpected behavior if file would overrides directory
Product: [Retired] Red Hat Raw Hide Reporter: Enrico Scholz <rh-bugzilla>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-07-31 19:51:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
sample spec-file for step (1) none

Description Enrico Scholz 2001-07-31 19:49:19 UTC
Description of Problem:

When having an RPM containing a symlink or ordinary file having the same
name as an already existing directory, a file with a strange name will be
created without any message/warning.

The strange name may be ok (a suffix like .rpmnew would be perhaps better)
but a warning would be advisably in any case.


Steps to Reproduce:
1. build package containing file /tmp/XXX
2. mkdir /tmp/XXX
3. rpm -U <package>.rpm
4. ls -d /tmp/X*


Actual Results:

no message at (3)

/tmp/XXX
/tmp/XXX;3b670b3a



Expected Results:

a warning


Additional Information:

rpm-4.0.3-0.84

Comment 1 Enrico Scholz 2001-07-31 19:51:55 UTC
Created attachment 25671 [details]
sample spec-file for step (1)

Comment 2 Jeff Johnson 2001-07-31 19:57:25 UTC
This is a packaging problem. rpm does not permit (and never has)
replacing a directory on disk with a symlink from the package.
You need to fix what ever package is trying to do this.

Meanwhile the strange name is a semi-colon followed by the
install time in seconds. New to rpm-4.0.3 is installing with a
temp name (i.e. the name followed by the semi-colon and time),
and then renaming into place.


Comment 3 Enrico Scholz 2001-07-31 20:28:27 UTC
How can I determine if a package has such a problem and which files are being
affected?

Have I to wait for bugreports of users who don't know why they have such files? 

A warning at installation-time would be highly appropriate.