Re: install same pkg multiple times with different --prefix on same host?

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

 



--- Hal Wine <hal@xxxxxxxxxxxxxx> wrote:

> >>On Wed, Dec 08, 2004 at 05:15:17PM -0800, No Spam wrote:
> >>I am pretty sure that RPM cannot do this.  RPM packages are key
> >>strictly by the name of the package.  You are asking for packages
> to
> >>be additionally identified by additional parameters, the 'prefix'
> in
> >>your case.  Given the RPM's other foibles, it probably cannot do
> this
> >>either.
> 
> Not quite true -- it's keyed by name-version-release. It's easy to
> have 
> multiple versions of a package installed
> 
> >>BTW, what command would you envision using to remove a specific
> >>instance of your package?
> >>
> >>    ? rpm -e package
> 
> rpm -e package-3.0-1

but this wouldn't work if you had installed package-3.0-1 to two
separate locations via two different uses of --prefix with rpm -i. 
maybe the answer to that ought to be simply "don't do that", and indeed
i think you probably need to force it with --replacepkgs to get it to
work.

although even with two different versions of package installed, it
might still be potentially error prone.  i'd want it to fail on an
erase or update operation that didn't specify the version, rather than
unpredictably operate on one or the other installations.  but i'm not
sure whether or not that's the case.  i'll look into that.
 
> So, the following should work (untested):
> 1. go grab rpmrebuild from rpmrebuild.sf.net
> 2. write a wrapper script for your installations that:
>    - for each install location:
>      - used rpmrebuild to rebuild the "real" rpm
>      - use the filter option to allow you to mangle the spec
>        file on the fly
>      - append something to the release number representing the
> --prefix
>         e.g. pkg-1.0-3_opt_foo1
>      - now install the freshly repackaged rpms using '-ivh'
> 
> RPM will think they are all different packages, and be happy. So will
> you.

an interesting hack, although i wonder if it will properly deal with
pre and post install and uninstall scripts.  also, if a user has to go
through all of those hoops just to install the software, that's
somewhat diminishing the value of using the OS-specific packaging in
the first place, and certainly making the redhat install much more
difficult than, for example, the solaris install will be.

thanks for your help, i may be able to put some of this to use.

- rich



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux