rpms

rpms

Post by Riyaz Mansoo » Wed, 13 Jun 2001 14:25:19



how can i force rpm to install foo.rpm to say /opt/foo and not the
default directory which could be /usr/local ?

riyaz

 
 
 

rpms

Post by J Haywar » Thu, 14 Jun 2001 05:57:14


Hi,


> how can i force rpm to install foo.rpm to say /opt/foo and not the
> default directory which could be /usr/local ?

--relocate oldpath=newpath

rpm -ivh --relocate /usr/local=/opt/foo foo.rpm

Some rpms are NOT relocatable.
You can use: --badreloc along with --relocate to force a non-relocatable
rpm to install, but this isn't adviseable.

Regards,
        Jim H

 
 
 

rpms

Post by Riyaz Mansoo » Thu, 14 Jun 2001 14:09:37


thanx J

but do i have to install it first to find the default directory? i checked
the man page for "relocate" and relocate always needs the original path i
assume. however, i came accrose "prefix" which _seems_ to do the same job
without supplying the directory. am i right on that?

thanx again

riyaz


> Hi,


> > how can i force rpm to install foo.rpm to say /opt/foo and not the
> > default directory which could be /usr/local ?

> --relocate oldpath=newpath

> rpm -ivh --relocate /usr/local=/opt/foo foo.rpm

> Some rpms are NOT relocatable.
> You can use: --badreloc along with --relocate to force a non-relocatable
> rpm to install, but this isn't adviseable.

> Regards,
>         Jim H

 
 
 

rpms

Post by J Haywar » Fri, 15 Jun 2001 03:31:43


Hi,


> thanx J

> but do i have to install it first to find the default directory? i checked
> the man page for "relocate" and relocate always needs the original path i
> assume. however, i came accrose "prefix" which _seems_ to do the same job
> without supplying the directory. am i right on that?

Yes, you can use --prefix also, It works slightly different from
--relocate. --relocate only changes the install location of the files in
the directory you specifiy, ie oldpath. --prefix changes the install
locations of all files in the rpm.

To display a list of files, this will list the full path where they are
installed, in an rpm that hasn't been installed yet use:

rpm -qpl foo.rpm

or to display information about an uninstalled rpm. This will tell you if
the rpm is relocateable also:

rpm -qpi foo.rpm

or you can combine them in the same command:

rpm -qpli foo.rpm

Regards,
        Jim H

 
 
 

rpms

Post by Robert Davie » Fri, 15 Jun 2001 19:01:24



> Yes, you can use --prefix also, It works slightly different from
> --relocate. --relocate only changes the install location of the files in
> the directory you specifiy, ie oldpath. --prefix changes the install
> locations of all files in the rpm.

> To display a list of files, this will list the full path where they are
> installed, in an rpm that hasn't been installed yet use:

> rpm -qpl foo.rpm

Great explanation J!
 
 
 

1. RPM for Uwin - cannot open file //var/lib/rpm/nameindex.rpm

Im trying to use the port of RPM for UWin. Unfortunatelly Im having
some problems to get it to work
properly.
   I installed the new version of Uwin (3.1) sucessfully. I also
downloaded RPM 4.0.3 from Wipro site and
installed it. I did the instalation from the root directory (/) using:

$ tar xvf rpm-4.0.3.tar
rpm-4.0.3.tar volume 1 in tar format
usr
usr/bin
usr/bin/rpm.exe
usr/bin/rpm2cpio.exe
usr/local
usr/local/lib
usr/local/lib/rpm
usr/local/lib/rpm/rpmrc
usr/man
usr/man/man8
usr/man/man8/rpm.8
usr/man/man8/rpm2cpio.8
12 files, 1365 blocks

   After that I created the directory  /var/lib/rpm .
   To create the rpm database I execute rpm --initdb . At this point
I get an error:

   $ rpm --initdb
   cannot open file //var/lib/rpm/nameindex.rpm: No such file or
directory

   At /var/lib/rpm was created the following file:

   $ pwd
   /var/lib/rpm
   $ ls
   packages.rpm

  The same message I get when I execute it using Administrator or su
.

  Thanks for any help,

      Gustavo

2. UK councils dump Windows for Linux

3. RPM corrupted, rpm --rebuilddb fails and there is data in the /var/lib/rpm directory

4. modem connection

5. RPM Crashes with "//var/lib/rpm/packages.rpm not found"

6. System hangup and "stale" partition.

7. RPM: cannot open //var/lib/rpm/packages.rpm

8. grep plus 3 lines

9. How to restore erased rpm data (rpm -e rpm)

10. Fwd: rpm-4.2, rpm-4.1.1, rpm-4.0.5, librpm404-4.0.5 release (finally)

11. Problem with Gnome RPM - Failed to open /var/lib/rpm/packages.rpm

12. Replacing RPM-placed files w/non-RPM files

13. Getting RPM to disallow unsigned RPMs