RPM Community Forums

Mailing List Message of <rpm-users>

Re: What am I doing wrong ?

From: Jeff Johnson <n3npq@mac.com>
Date: Sun 02 Jan 2011 - 19:52:43 CET
Message-id: <EBDD0180-6E3F-4F4C-8309-B13A91524FB3@mac.com>

On Jan 2, 2011, at 1:11 PM, Sriram Narayanan wrote:

> All:
> 
> I'm trying to get a basic RPM to build, and am facing the following
> errors during install:
> 
> error: Failed dependencies:
> 	/usr/local/bin is needed by bash-4.1-1.i86pc
> 	/usr/local/share/info is needed by bash-4.1-1.i86pc
> 	/usr/local/share/locale/af/LC_MESSAGES is needed by bash-4.1-1.i86pc
> 	/usr/local/share/locale/bg/LC_MESSAGES is needed by bash-4.1-1.i86pc
> 	/usr/local/share/locale/ca/LC_MESSAGES is needed by bash-4.1-1.i86pc
> 
> I've attached a test spec file. This contains basic stuff and is
> intended to only check if I'm doing the right things.
> 

You aren't doing anything wrong afaict.

These are "parentdir" dependencies:
	Every file implicitly requires its parent directory.

There's also "linkto" dependencies:
	Every symlink requires its target end-point.

In both cases a Requires: dependency is implictly synthesized
from other tags, RPMTAG_DIRNAMES and RPMTAG_FILELINKTOS resp.

There are --noparentdirs/--nolinktos disablers, and there are 2 bits
that need to be flipped compiled in to change the default behavior.
There's also a per-vendor peculier macro (iirc) to do same at runtime,
but you will need to add -DRPM_VENDOR_BELLENIX to CFLAGS and change
#ifdef's if you want.

What I recommend instead of disabling or changing default behavior is to
configure orphan directory/linkto paths instead:
	mkdir -p /etc/rpm/sysinfo
	echo "/usr/local/bin" >> /etc/rpm/sysinfo/Dirnames
This is what I do; the drudgery isn't _THAT_ painful imho, ymmv.

There is also (as you proceed, you likely don't have many
packages installed) this POPT alias to list all missing parentdirs
	mkdir -p /etc/rpm/sysinfo
	rpm -Va --nofiles --orphandirs | sort -u >> /etc/rpm/sysinfo/Dirnames

hth

73 de Jeff
> -- 
> Belenix: www.belenix.org
> <bash.spec>
Received on Sun Jan 2 19:53:35 2011
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.