/usr/lib/perl5/5.8.8/Getopt/Long.pm contains: use vars qw($VERSION); $VERSION = 2.35; # For testing versions only. #use vars qw($VERSION_STRING); #$VERSION_STRING = "2.35"; But rpm's perl.prov script can't parse the version number: $ /usr/lib/rpm/perl.prov /usr/lib/perl5/5.8.8/Getopt/Long.pm perl(Getopt::Long) perl(Getopt::Long::Parser) As a result, trying to use a construct like this in a spec file will fail: Requires: perl(Getopt::Long) Conflicts: perl(Getopt::Long) < 2.30 ...because as far as rpm is concerned, it doesn't know what version perl(Getopt::Long) is providing. The package versions in question are: $ rpm -q perl rpm perl-5.8.8-10 rpm-4.4.2-32 This is a minor bug, but still an annoying one.
User pnasrat's account has been closed
Reassigning to owner after bugzilla made a mess, sorry about the noise...
Created attachment 172460 [details] patch to correct perl.prov's behavior Well, here's the problem: $ grep -E '^\s*(package|\$VERSION)' /usr/lib/perl5/5.8.8/Getopt/Long.pm package Getopt::Long; $VERSION = 2.35; package Getopt::Long::Parser; package Getopt::Long; The problem is, when /usr/lib/rpm/perl.prov sees a "package" statement, it forgets about any previous $VERSION line it saw. In other words, perl.prov is expecting this: $ grep -E '^\s*(package|\$VERSION)' /usr/lib/perl5/5.8.8/Getopt/Long.pm package Getopt::Long; $VERSION = 2.35; package Getopt::Long::Parser; package Getopt::Long; $VERSION = 2.35; But from reading /usr/lib/perl5/5.8.8/Getopt/Long.pm, this is clearly wrong; the second "package Getopt::Long" definition is concatenating with the first one. I think perl.prov should try to match perl's behavior. And we can test that: $ cat native-perl-provides #! /usr/bin/perl use Getopt::Long; use strict; use warnings; if (defined $Getopt::Long::VERSION) { print "perl(Getopt::Long) = $Getopt::Long::VERSION\n"; } else { print "perl(Getopt::Long)\n"; } if (defined $Getopt::Long::Parser::VERSION) { print "perl(Getopt::Long) = $Getopt::Long::Parser::VERSION\n"; } else { print "perl(Getopt::Long::Parser)\n"; } ./native-perl-provides perl(Getopt::Long) = 2.35 perl(Getopt::Long::Parser) So, according to perl itself, Getopt::Long has a version, but Getopt::Long::Parser does not. That means that successive definitions of the same package should NOT stomp a previously-found $VERSION. The attached patch implements this behavior.
Fixed in rpm 4.4.2.2(-rc1) in next rawhide push. 4.4.4.2 final should find it's way to F7 too eventually... Thanks for the patch!