Re: How can I manually populate an RPM database

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

 



On Wed, 28 Jul 2004 Fulko.Hew@xxxxxxxxx wrote:

> 
> I've built an embedded system (based on MontaVista (based on RedHat)).
> The software as delivered by MontaVista includes RPM binaries, but
> not a populated RPM database.
> 
> Now I need to use RPM (for a variety of other reasons).
> 
> I've built my first RPM (on SCO OpenServer, don't ask why... because I have
> too.)
> And when I try to install it, RPM on the target system says:
> 
> 
> error: failed dependencies:
>         /bin/bash   is needed by acncfg-HANSON1_1001-1
> 
> Since bash wasn't installed via RPM, how can I convince RPM
> that bash exists.
> 
> Yes, I know I can install with nodep, but that 'kinda' defeats
> one of the features of RPM.
> 
> 
> So the question is:
> 
> 1/ How can I manually populate bash into the database?
>
I have been in this chicken and egg scenario before.  There are two 
approaches I now of:

	1) If you actually have the rpm that could have been used to 
	   to install bash, you could do:

		rpm -Uvh --justdb bash*rpm
	
	2) You can create a tiny specfile that it provides bash with 
	   a line like:

		Provides: /bin/bash


	   and most likely you will need:

		Provides: /bin/sh

	   build this tiny rpm that delivers no files, only "provides" 
	   them and install it on your system.

The second approach only more expanded is used to cope with non-native-rpm
systems (i.e. ones that come with a different package manager other than
rpm).  On these systems (such as Solaris) a script is ran that figures out
what is provided by the packages in the native package database, and from 
this it creates a specfile that provides all these things.  A package is 
built from the spec file and the package is installed into the rpm db.
 
> 
> BTW:
> 
> 2/ I also don't even know why my RPM is dependent on bash.
>    I didn't make the dependency.  Is it built into RPM itself?
>
Well, if your specfile has scriptlets, then it will need bash unless you
specified an alternate interpreter.  Also if it delivers shell scripts 
rpm will pick up the dependency from the magic (i.e. the #! line).

Cheers...james  


_______________________________________________
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