Bug 75057

Summary: rpm-4.1: --relocate is not working.
Product: [Retired] Red Hat Linux Reporter: Aleksey Nogin <aleksey>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED RAWHIDE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 8.0CC: bill, chris.ricker, dan, jason, jim.fisher, redhatbugzillaold, sandor.szabo, vanderwl
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: 2002-12-28 00:25:01 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:

Description Aleksey Nogin 2002-10-04 01:38:50 UTC
% rpm --dbpath /tmp/rpm -i --relocate /usr=/tmp/ocaml
/tmp/ocaml-3.04-7.rh7.2.i386.rpm --nodeps
error: unpacking of archive failed on file /usr/bin/camlp4;3d9cefe2: cpio: open
failed - Permission denied

% rpm -qip /tmp/ocaml-3.04-7.rh7.2.i386.rpm
Name        : ocaml                        Relocations: /usr
[...]

% rpm -q rpm
rpm-4.1-1.06

The exact same RPM installs fine with exact same command line on 7.2 using
rpm-4.0.4-7x

Comment 1 Need Real Name 2002-10-04 11:02:59 UTC
With rpm-4.1, the command:

rpm -i --relocate $OLDPATH=$NEWPATH --badreloc somepackage.rpm

gives no error messages, but the relocation is ignored. The package is instaled
in $OLDPATH !

With rpm-4.0, the same command works fine.

Comment 2 Need Real Name 2002-10-04 17:46:15 UTC
I have also run into this problem with rpm 4.1-1.06 on RedHat 8.0.  Not only 
does it not relocate the package it never sets the RPM_INSTALL_PREFIXn 
environment values.  This causes there use in the post script to fail.  This 
did not happen in previous versions of rpm.

Comment 3 Mark Vanderwiel 2002-10-07 20:38:03 UTC
I also see the problem where $RPM_INSTALL_PREFIX is not being set during %post 
and %postun script processing.

This is a major problem with installing rpm's with scripts.
Should the Priority be bumped up on this one?



Comment 4 Jeff Johnson 2002-11-16 20:12:02 UTC
*** Bug 75550 has been marked as a duplicate of this bug. ***

Comment 5 Jeff Johnson 2002-12-03 18:49:41 UTC
*** Bug 78898 has been marked as a duplicate of this bug. ***

Comment 6 Jeff Johnson 2002-12-10 11:59:05 UTC
*** Bug 79331 has been marked as a duplicate of this bug. ***

Comment 7 Jeff Johnson 2002-12-28 00:25:01 UTC
Fixed in rpm-4.2-0.42.

Be forewarned: rpm is switching to using posix
mutexes from nptl at the moment, and I'm not at
all sure whether the Raw Hide version will run
on Red Hat 8.0.