[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Use of %{INSTALLPREFIX} in %post section
- From: Tim Mooney <mooney dogbert cc ndsu NoDak edu>
- To: rpm-list redhat com
- Subject: Re: Use of %{INSTALLPREFIX} in %post section
- Date: Fri, 25 Jan 2002 15:57:52 -0600 (CST)
In regard to: Use of %{INSTALLPREFIX} in %post section, arun.sharma@escalat...:
>So my question is, how do I locate the installed files in %post for a
>relocatable package ?
I don't build a lot of relocatable packages (I rarely use the feature)
but I've gotten into the habit of doing this at the top of most of the
%post scripts I've written:
if test X"$RPM_INSTALL_PREFIX" = X"" ; then
RPM_INSTALL_PREFIX=%{PREFIX}
export RPM_INSTALL_PREFIX
fi
Note that this depends on one of our local conventions: doing a
%define PREFIX /some/prefix
at the top of a spec file, and then referencing everything relative
to that.
Essentially the code just tests to see if RPM_INSTALL_PREFIX is set.
If it is, then we know the installer is relocating the package. If it's
not, then we know that we're just using the default prefix that the spec
file was coded to use.
I'm not sure how this works when you're relocating different parts of
the package to different areas using multiple `--relocate /foo=/bar'
arguments. My guess is it breaks horribly, but I've never tested much
of this part of RPM.
Tim
--
Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu
Information Technology Services (701) 231-1076 (Voice)
Room 242-J6, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[]