Re: Absolute paths

When last we left our heros, they were speaking of:
> Peter Astrand <> writes:
> > It would be great if Gnome worked this way. The binaries for Solaris 2.7
> > provided by HelixCode, for example, have /opt/gnome hardcoded, and this is
> > not where I want to / can install Gnome. I'd like to run:
> > 
> > rpm -vhi <gnome RPMS> --prefix=/usr/local/gnome
> > 
> > , for example, but as far as I understand, this is not possible. Can this
> > be fixed? 
> It has been discussed. Conclusion: yes we would love the feature, but
> we have no real idea how to implement it.
> There are two ways to do it:
>  - use the path that was given to configure at compile time
>  - allow the user to set an environment variable or edit a 
>    config file setting a new path
> The second can be supported in addition to the first, but it won't
> allow transparent RPM relocation, you'll still need to do the config
> file editing.

	Can I ask what may be an obvious question, but what about having the 
postinstall script that the rpm runs do pathname substitution on a template
config file?  
	i.e. the RPM contains a "config.template", which contains several 
%INST_PATH% tokens, rather than the actual installation path.  Then, as part
of the postinstall process (where daemons would be restarted, etc), you just
do a sed s~%INST_PATH%~/actual/installation/path~g on the config.template, 
writing the output to the actual config file?


    Justin Ferguson - Geek of All Trades - Technical Solutions Consultant   <> <JFerg at The Dot in .Net>
"...`hot' subjects (C++, Qt, KDE, Gnome) which the slashdot community handles
   very badly, with utterly passionate cluelessness." -- Guillaume Laurent

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