[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

$RPM_INSTALL_PREFIX broken still/again?



I see this problem mentioned with regards to RH8 and rpm < 4.2, but I
seem to be seeing the same problem on RH9 with rpm-4.2-0.69.  Here is a
sample spec file:

Summary:        Test package
Name:           test-package
Version:        1.0
Release:        1
Group:          System Environment/Daemons
License:        GPL
BuildRoot:      %{_builddir}/%name-%version
BuildArch:      noarch
Prefix:         /usr/local

%description
This is a test package

%pre
echo "pre - RPM_INSTALL_PREFIX = \"$RPM_INSTALL_PREFIX\""

%install

%post
echo "post - RPM_INSTALL_PREFIX = \"$RPM_INSTALL_PREFIX\"";

%files

%changelog
* Thu May 29 2003 Robert Flemming <flemming@spiralout.net>
- Test package

Here are the results when install it on my RH9 system:

foo:/tmp# rpm -ivh test-package-1.0-1.noarch.rpm
Preparing...                ########################################### [100%]
pre - RPM_INSTALL_PREFIX = ""
   1:test-package           ########################################### [100%]
post - RPM_INSTALL_PREFIX = ""

foo:/tmp# rpm -ivh --prefix=/tmp test-package-1.0-1.noarch.rpm
Preparing...                ########################################### [100%]
pre - RPM_INSTALL_PREFIX = ""
   1:test-package           ########################################### [100%]
post - RPM_INSTALL_PREFIX = ""

Now here is the same package being installed on a 7.2 machine with
rpm-4.0.3-1.03 installed:

[root@bar tmp]# rpm -ivh test-package-1.0-1.noarch.rpm
Preparing...                ########################################### [100%]
pre - RPM_INSTALL_PREFIX = "/usr/local"
post - RPM_INSTALL_PREFIX = "/usr/local"

[root@bar tmp]# rpm -ivh --prefix=/tmp test-package-1.0-1.noarch.rpm
Preparing...                ########################################### [100%]
pre - RPM_INSTALL_PREFIX = "/tmp"
post - RPM_INSTALL_PREFIX = "/tmp"

I didn't see any bugs for RH9 in bugzilla, but I'll submit one if this
indeed was never fixed, or is somehow broken again.

Robert




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []