[Yum] a dependency is not being detected?

Fulko Hew fulko.hew at gmail.com
Wed Feb 10 16:34:08 UTC 2010


On Wed, Feb 10, 2010 at 10:57 AM, Seth Vidal <skvidal at fedoraproject.org>wrote:

>  On Wed, 10 Feb 2010, Fulko Hew wrote:
>
>  I've been perplexed by yum....
>>
>> I have a package (rpm) I've created.  One if its dependencies is
>> 'perl-SNMP-Session'. When I build my package the process reports
>> (trimmed for brevity):
>>
>> Requires: /bin/sh /usr/bin/perl bash chkconfig coreutils grep
>> initscripts mysql-server perl >= 0:5.002 perl(AutoLoader)
>> ...
>> perl(SNMP_Session)
>> ...
>>
>> To install, I use: 'yum install --nogpgcheck MyPackage.rpm'
>>
>> On Fedora boxes (example F12) it detects the missing dependency
>> and also installs perl-SNMP-Session, but on an RHEL 5.4 box it
>> doesn't report the missing dependency.
>>
>> Note: The RHEL 5.4 box does have the mrtg package installed,
>> and that package has a copy of the relevant files I need,
>> (but the mrtg package doesn't install them into a location that Perl can
>> find.)
>>
>> # rpm -qa --filesbypkg | grep SNMP_Session
>> mrtg     /usr/lib/mrtg2/SNMP_Session.pm
>>
>> Using the 'verbose' flag during yum install, it says:
>>
>> looking for ('perl(SNMP_Session)', None, (None, None, None)) as a
>> requirement of MyPackage.noarch 0-1.0-5 u
>>
>> but:  'yum list "*SNMP_Session*"' reports it as 'available', _not_
>> 'installed':
>>
>> Available Packages:
>> perl-SNMP_Session.noarch     1.12-3.el5.1    epl
>>
>> So the question is...
>> if its not installed, why isn't it being required/found as a missing
>> dependency?
>>
>>
> run:
> rpm -qR mypackage.rpm
>
> b/c I suspect the things providing perl(SNMP_Session) are different on el5
> than on f12.
>

Running the above command (without the .rpm extension) results in a list
that contains the 'perl(SNMP_Session)'

-------
What I think is different is: on el5, the mrtg package was installed, and on
my f12 I didn't.

Pursuing it  further on el5... when I ran yum deplist MyPackage I see:

...
dependency: perl(SNMP_Session)
  provider: perl-SNMP_session.noarch 1.12-3.el5.1
  provider mrtg.i386 2.14.5-2

... that led me to look at mrtg with:
rpm -q --provides mrtg

and it reports amongst other things:

perl(SNMP_Session)

so it seems to me that, the _other_ package (mrtg) is reporting
that it is 'providing' a resolvable resource, that other packages
should be able to use (even though they only have a private
copy in a private location)

... and that is telling yum, that what _I_ need 'should' be installed
because
mrtg is telling it so... incorrectly.

I would think the 'correct' answer would be to 'fix' mrtg so that
it doesn't tell yum/rpm that it is providing something that
others can't find/use.

I tested this by erasing the mrtg package and re-installing MyPackage...
... still no joy, because yum knows perl-SNMP-Session can be resolved
by either mrtg or perl-SNMP_Session (as shown above) and it still
picked mrtg as the way to go.

My only recourse (at the moment) seems to be to manually install
perl-SNMP-Session first, and then MyPackage.

Comments?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.baseurl.org/pipermail/yum/attachments/20100210/8f6c5cec/attachment.htm>


More information about the Yum mailing list