Bug 75550 - --relocate is ignored & RPM_INSTALL_PREFIX isn't defined
Summary: --relocate is ignored & RPM_INSTALL_PREFIX isn't defined
Status: CLOSED DUPLICATE of bug 75057
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm   
(Show other bugs)
Version: 8.0
Hardware: i386 Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
: 76326 77433 77967 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2002-10-09 20:44 UTC by Todd Allen
Modified: 2005-10-31 22:00 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-11-16 20:10:40 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Makefile (827 bytes, text/plain)
2002-10-09 20:46 UTC, Todd Allen
no flags Details
"it" rpm spec (426 bytes, text/plain)
2002-10-09 20:46 UTC, Todd Allen
no flags Details

Description Todd Allen 2002-10-09 20:44:40 UTC
Description of Problem:

If the --relocate option is specified when installing an rpm, it is ignored.
(Although it does still do syntax checking on it.)  The rpm contents end up
being installed in the default place.

Also, the RPM_INSTALL_PREFIX and RPM_INSTALL_PREFIXn environment variables are
left undefined, regardless of whether or not --relocate was specified.  This
actually is worse for those of us rpm writers packagers who use that variable in
the target of a symlink.  The symlink ends up pointing into the weeds.

Version-Release number of selected component (if applicable): 4.1-1.06

How Reproducible: every time

Steps to Reproduce:
1. Get the Makefile and it.spec that I'll put in attachments.
2. make
3. rpm -ivh --relocate /usr/opt=/elsewhere it-1.0-1.i386.rpm
4. rpm -ql it

Actual Results:

The "rpm -ivh" command will dump any RPM-related environment variables. There
will be none.  The "rpm -ql" command will show that the files are installed in
/usr/opt and not /elsewhere.

Expected Results:

The "rpm -ivh" command should dump:
The "rpm -ql" command should report:

Additional Information:
This works with 4.0.4 (from 7.3) and 4.1-0.81 (from 7.3.94/null).

Furthermore, an rpm built with 4.1-1.06 can be installed properly on a system
with 4.1-0.81.  So, it appears to be a bug in the rpm command doing the
installation, as opposed to the rpmbuild building it.

Comment 1 Todd Allen 2002-10-09 20:46:19 UTC
Created attachment 79705 [details]

Comment 2 Todd Allen 2002-10-09 20:46:51 UTC
Created attachment 79706 [details]
"it" rpm spec

Comment 3 Jason Merrill 2002-11-05 05:21:26 UTC
*** Bug 76326 has been marked as a duplicate of this bug. ***

Comment 4 Jeff Johnson 2002-11-16 20:08:23 UTC
*** Bug 77967 has been marked as a duplicate of this bug. ***

Comment 5 Jeff Johnson 2002-11-16 20:10:33 UTC
*** Bug 77433 has been marked as a duplicate of this bug. ***

Comment 6 Jeff Johnson 2002-11-16 20:12:08 UTC

*** This bug has been marked as a duplicate of 75057 ***

Comment 7 SHwareSyst 2003-02-14 18:41:56 UTC
--relocate is/was broken in rpm-4.1.  This is now fixed in rpm-4.2

Added for folks linking here from ActiveState download pages

Comment 8 ashish gandhi 2005-10-21 12:31:35 UTC
hi This is my spec file which i used to create rpm----

%define VCS ashish
Provides: /%{VCS}
Prefix: /etc%{provides}
i had problem for using multiple prefix and in relocations

in my file list i had directory structure such as follows

so i had the problem of multiple relocations

i wanted to relocate /etc/ashish/* to /etc/gandhi/* and /opt/ashish/* to

with the rpm -install time i had problem in using multiple prefixes

so with above solution it worked well

i typed the commands as

rpm -i --relocate /opt/ashish=/opt/gandhi --relocate /etc/ashish=/etc/gandhi

it worked

as wll as

rpm -i <pkgname>.rpm



ashish gandhi

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