Bug 1558 - RPM 4.1 finds a spurious dependency for MIME::Body
Summary: RPM 4.1 finds a spurious dependency for MIME::Body
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Packaging: RPM (show other bugs)
Version: 2.50
Hardware: Other other
: P5 normal
Target Milestone: 2.50
Assignee: Malte S. Stretz
URL:
Whiteboard:
Keywords: backport
Depends on:
Blocks:
 
Reported: 2003-02-25 10:08 UTC by Theo Van Dinter
Modified: 2003-03-13 10:10 UTC (History)
1 user (show)



Attachment Type Modified Status Actions Submitter/CLA Status
kluge around RPM 4.1 problems patch None Theo Van Dinter [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Theo Van Dinter 2003-02-25 10:08:39 UTC
It looks like RPM 4.1 finds the eval for 'use MIME::Body' in EncappedMessage and makes it a dependency for the package.  Earlier versions of RPM (4.0.4 anyway) knows it's in an eval and doesn't do the dependency.

While the bug seems to be in RPM, we can apparently kluge around it by putting the use on the same line as the eval (right now it's "eval '", newline, "use MIME::Body;" ...)

I asked the person who reported it to me to check if changing the single quotes to braces ({}) would solve the problem too (leaving all other formatting the same).   Once I find out if that works, I'll put in a patch for 2.51.
Comment 1 Theo Van Dinter 2003-02-25 10:57:43 UTC
Subject: Re: [SAdev]  New: RPM 4.1 finds a spurious dependency for MIME::Body

On Tue, Feb 25, 2003 at 10:08:39AM -0800, bugzilla-daemon@hughes-family.org wrote:
> I asked the person who reported it to me to check if changing the single quotes to braces ({}) would solve the problem too (leaving all other formatting the same).   Once I find out if that works, I'll put in a patch for 2.51.

It turns out my RH8 box will, in fact, boot without a video card.

So, no, the braces alone don't work.  It does look like putting the eval
and the use on the same line works though.  Crazy RPM.

Since you're wondering, /usr/lib/rpm/perl.req has:

        (m/^(\s*)         # we hope the inclusion starts the line
         (require|use)\s+(?!\{)     # do not want 'do {' loops
         # quotes around name are always legal
         [\'\"]?([^\;\ \'\"\t]*)[\'\"]?[\t\;\ ]
         # the syntax for 'use' allows version requirements
         \s*([.0-9]*)
         /x) 
        ) {

Which I guess works most of the time, but ...

I'm also seeing what some other folks are reporting, which seems like more
RPM stupidness.  For instance: perl(.::tmp/rules.pl) is required because
there's a 'require "tmp/rules.pl"' in most of the masses/* scripts.
Have to see what other strangeness I can get out of this thing. <sigh>
It looks like if the "require" isn't starting at the front of the line
(ie: /^require/) later in the code it'll ignore that line.  I'm going
to kluge in something to fix this too.

We do a "require './tmp/rules.pl'" in rewrite-cf-with-new-scores.
This used to be ignored, but now that "if the module starts with ./"
bit is commented out.  Fscking RPM people, they keep breaking things
every damn time they upgrade things.

Comment 2 Theo Van Dinter 2003-02-25 11:30:11 UTC
will attach patch in a moment.  it solves all of the RPM 4.1 dependency 
issues that I could see.
Comment 3 Theo Van Dinter 2003-02-25 11:30:43 UTC
Created attachment 680 [details]
kluge around RPM 4.1 problems
Comment 4 Malte S. Stretz 2003-03-02 13:30:04 UTC
OKAY 
Comment 5 Theo Van Dinter 2003-03-13 19:10:53 UTC
committed to 2.5 branch  closing ticket