[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Use of %{INSTALLPREFIX} in %post section
- From: Jeff Johnson <jbj JBJ ORG>
- To: rpm-list redhat com
- Subject: Re: Use of %{INSTALLPREFIX} in %post section
- Date: Fri, 25 Jan 2002 17:40:15 -0500
On Fri, Jan 25, 2002 at 01:28:49PM -0800, arun.sharma@escalate.com wrote:
> Hi,
>
> I have a relocatable package with a default prefix, which could be
> overridden at install time.
> After the package installation, I'd like to execute a command on one of the
> installed files
> using the %post macro.
>
> But without having access to %{INSTALLPREFIX}, I can't find the installed
> files. I've examined
> the environment of the shell that's invoked for %post and I didn't find
> anything that had the
> install directory.
>
> So my question is, how do I locate the installed files in %post for a
> relocatable package ?
>
A long time ago, rpm permitted only a single
Prefix: /bing/bang/boom
tag which was mapped into the envvar
RPM_INSTALL_PREFIX=/bing/bang/boom
when executing package scriptlets. If your package can live with
only a single prefix, try using $RPM_INSTALL_PREFIX.
Then, since rpm-3.0, the tag
Prefix:
was generalized to permit multiple instances, and each of the relocation
hints was mapped to envvar's
RPM_INSTALL_PREFIX0=...
RPM_INSTALL_PREFIX1=...
RPM_INSTALL_PREFIX2=...
etc. So, if you need several Prefix: relocation hints, you're gonna need
to figure the mapping onto 0, 1, 2, etc. I believe the mapping is the
same order as encountered in the spec file, but I haven't checked.
Finally, since rpm now permits any file path to be remapped, and you
want the actual install path rather than the original path, you're
gonna have to wait for concurrent access to the database from a
scriptlet to get, as there's far too much glob in a package file manifest
to undertake mapping into a scriptlet environment for access for the
handful of packages that are relocateable.
Yes, Tim, your bugzilla request for this feature has not been forgotten :-)
73 de Jeff
--
Jeff Johnson ARS N3NPQ
jbj@jbj.org (jbj@redhat.com)
Chapel Hill, NC
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[]