Bug 109336

Summary: find-requires.perl is easily confused and a bit needy
Product: [Retired] Red Hat Linux Reporter: Bishop Clark <bishop>
Component: rpm-buildAssignee: Jeff Johnson <jbj>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 9Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-12-27 15:22:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bishop Clark 2003-11-06 22:03:09 UTC
Description of problem:
/usr/lib/rpm/find-requires.perl creates requirement lists that include
conflicting packages.

Version-Release number of selected component (if applicable):
rpm-build-4.2-0.69

How reproducible:

Always.

Steps to Reproduce:
1. In my case, produce a mod_perl application, or port one, that can
be used in MP1 and MP2.  This requires code like the following:

use constant MP2 => $mod_perl::VERSION >= 1.99;
if (MP2) {
    require Apache::Const;
    Apache::Const->import(-compile => qw(:common));
    use ModPerl::Registry ();
}
else {
    require Apache::Constants;
    Apache::Constants->import(qw(:common));
    use Apache::Registry ();
}

2. package this code
3. attempt to install this code.
  
Actual results:
The resulting package, if find-requires.perl is used, requires BOTH
perl(Apache::Registry) and the replacement perl(ModPerl::Registry),
and they both cannot be installed concurrently.

Expected results:
On Mod_Perl 2 systems, where Registry is in ModPerl, --requires would
conceivably only include that requirement.  The converse would be true
for MP1-based systems.

Additional info:

Nah, I've not got high hopes on this one.  I mean, the workaroudn of
hand-compiling requirements lists is an option, if a terribly
distasteful one.

Comment 1 Jeff Johnson 2003-12-27 15:22:41 UTC
find-requires.perl is pure mechanism, some feeble regex's
run across *.pl files. There's no way to guess (nor should
there be) complicated semantics of alternate names for
identical functionality.

WONTFIX as in very hard problem.