You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2014/02/12 23:35:32 UTC

[Bug 7008] New: Mail::SpamAssassin::Conf contains HTML::Parser::Version causes Indexing issue with CPAN

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=7008

            Bug ID: 7008
           Summary: Mail::SpamAssassin::Conf contains
                    HTML::Parser::Version causes Indexing issue with CPAN
           Product: Spamassassin
           Version: 3.4.0
          Hardware: PC
                OS: Windows 7
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Libraries
          Assignee: dev@spamassassin.apache.org
          Reporter: kmcgrail@pccc.com

PAUSE issue is: Status: Version parsing problem
          ===============================

     module: Mail::SpamAssassin::Conf
          version: undef
          in file: Mail-SpamAssassin-3.4.0/lib/Mail/SpamAssassin/Conf.pm
          status: The PAUSE indexer was not able to parse the following line
             in that file: C< unless ($HTML::Parser::VERSION >= 3.46) {
             > Note: the indexer is running in a Safe compartement and
             cannot provide the full functionality of perl in the
             VERSION line. It is trying hard, but sometime it fails. As
             a workaround, please consider writing a META.yml that
             contains a 'provides' attribute or contact the CPAN admins
             to investigate (yet another) workaround against "Safe"
             limitations.)


>From discussions with David Golden, change 

 require HTML::Parser;
        unless ($HTML::Parser::VERSION >= 3.46) {
            $self->{parser}->lint_warn("config: normalize_charset requires
HTML::Parser 3.46 or later");
            return $INVALID_VALUE;
        }

to use this concept (needs to be eval because VERSION is an assertion):

    unless ( eval { HTML::Parser->VERSION(3.46) } ) {
        ...
    }


Also, here's the real-world impact from David Golden:

"As long as "Mail::SpamAssassin" was indexed, then people can install it.  The
things that failed to index did not get updated. So, for example, compare these
index entries:

    Mail::SpamAssassin             3.004000 
K/KM/KMCGRAIL/SpamAssassin/Mail-SpamAssassin-3.4.0.tar.gz
    Mail::SpamAssassin::Conf          bogus 
K/KM/KMCGRAIL/Mail-SpamAssassin-3.3.2.tar.gz

Should some crazy person do "cpan Mail::SpamAssassin::Conf" they would get the
3.3.2 tarball.

Realistically, you probably don't need to care."

Running make test on a fix right now of:

Index: lib/Mail/SpamAssassin/Conf.pm
===================================================================
--- lib/Mail/SpamAssassin/Conf.pm       (revision 1567764)
+++ lib/Mail/SpamAssassin/Conf.pm       (working copy)
@@ -1135,7 +1135,8 @@
            return $INVALID_VALUE;
        }
        require HTML::Parser;
-       unless ($HTML::Parser::VERSION >= 3.46) {
+        #changed to eval to use VERSION so that this version was not
incorrectly parsed for CPAN
+       unless ( eval { HTML::Parser->VERSION(3.46) } ) {
            $self->{parser}->lint_warn("config: normalize_charset requires
HTML::Parser 3.46 or later");
            return $INVALID_VALUE;
        }

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7008] Mail::SpamAssassin::Conf contains HTML::Parser::Version causes Indexing issue with CPAN

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=7008

--- Comment #3 from Kevin A. McGrail <km...@pccc.com> ---
(In reply to Mark Martinec from comment #2)
> There are several more cases like that. Are these not causing a problem?
> 
> find lib/Mail/ -name '*.pm' -exec egrep '(::|->)VERSION[^(]' {} \; -a -ls

Nothing else failed to Index except for things with a Bogus version.

Likely files that have a valid Version defined so the indexer doesn't keep
looking?

Just a guess.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7008] Mail::SpamAssassin::Conf contains HTML::Parser::Version causes Indexing issue with CPAN

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=7008

--- Comment #2 from Mark Martinec <Ma...@ijs.si> ---
There are several more cases like that. Are these not causing a problem?

find lib/Mail/ -name '*.pm' -exec egrep '(::|->)VERSION[^(]' {} \; -a -ls

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7008] Mail::SpamAssassin::Conf contains HTML::Parser::Version causes Indexing issue with CPAN

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=7008

Kevin A. McGrail <km...@pccc.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |kmcgrail@pccc.com
         Resolution|---                         |FIXED

--- Comment #1 from Kevin A. McGrail <km...@pccc.com> ---
Thanks to David, I believe this is resolved.  Will upload 3.4.1 to CPAN when
it's released and hopefully be good to go.

svn commit -m 'Bug 7008 CPAN Parsing fix'
Sending        lib/Mail/SpamAssassin/Conf.pm
Transmitting file data .
Committed revision 1567786.

-- 
You are receiving this mail because:
You are the assignee for the bug.