Bug 734253 - HTML::Template 2.10 versioning problem
Summary: HTML::Template 2.10 versioning problem
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-HTML-Template
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-29 21:45 UTC by Ville Skyttä
Modified: 2011-09-09 17:02 UTC (History)
3 users (show)

Fixed In Version: perl-HTML-Template-2.10-3.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-09 17:02:16 UTC


Attachments (Terms of Use)
Set module version to (fake) 2.91 (3.11 KB, patch)
2011-08-30 18:10 UTC, Ville Skyttä
no flags Details | Diff

Description Ville Skyttä 2011-08-29 21:45:05 UTC
HTML::Template 2.10 is treated by perl's versioning comparisons as a floating point number, which means it's the same as if its version was 2.1.

Upstream bug report: https://rt.cpan.org/Public/Bug/Display.html?id=70190

Reproducer:

$ perl -e 'use HTML::Template 2.6'
HTML::Template version 2.6 required--this is only version 2.10 at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

rpm's version comparison is probably unaffected, but anything using e.g. "use HTML::Template 2.x" for x >= 2 is now broken at runtime with HTML::Template 2.10.  Packages included in Fedora broken such way include at least perl-HTML-Template-Expr and w3c-markup-validator.

I'm not aware of an easy way to fix this in HTML::Template (apart from bumping the version to 3.00 but that's hardly something that should be done in the Fedora package), so I suppose affected packages could be patched so that any versions in their "use HTML::Template" statements are removed.  Other ideas?

Comment 1 Petr Pisar 2011-08-30 06:29:01 UTC
Change module version to and RPM provides to 2.91, RPM version to 2.10.1 until upstream bumps new version.

Comment 2 Ville Skyttä 2011-08-30 18:10:06 UTC
Created attachment 520663 [details]
Set module version to (fake) 2.91

I don't think there's any need to lie about the rpm version or provides version; rpm's version comparison algorithm does not have any issues with 2.9 -> 2.10.

The attached patch bumps module version to 2.91 while keeping the rest at 2.10 (and fixes a couple of trivial issues while at it).  Ok if I commit and push this to F-16?

Comment 3 Petr Pisar 2011-08-31 07:29:26 UTC
Yeah, it should work so.

Comment 4 Tom "spot" Callaway 2011-08-31 14:41:17 UTC
(In reply to comment #2)

> The attached patch bumps module version to 2.91 while keeping the rest at 2.10
> (and fixes a couple of trivial issues while at it).  Ok if I commit and push
> this to F-16?

I don't see where that patch actually bumps the module version to 2.91, might be misreading it.

Comment 5 Petr Pisar 2011-08-31 15:10:15 UTC
(In reply to comment #4)
> (In reply to comment #2)
> 
> > The attached patch bumps module version to 2.91 while keeping the rest at 2.10
> > (and fixes a couple of trivial issues while at it).  Ok if I commit and push
> > this to F-16?
> 
> I don't see where that patch actually bumps the module version to 2.91, might
> be misreading it.

-$HTML::Template::VERSION = '2.10';
+# https://bugzilla.redhat.com/show_bug.cgi?id=734253
+$HTML::Template::VERSION = '2.91';

So Perl gets new version and and this one gets propagated into RPM by rpmbuild dependency generator too.

Comment 6 Tom "spot" Callaway 2011-08-31 16:00:30 UTC
Yep, I see it now. Go ahead and commit that change Ville.

Comment 7 Ville Skyttä 2011-09-01 04:18:57 UTC
Done in 2.10-3.


(In reply to comment #5)
> So Perl gets new version and and this one gets propagated into RPM by rpmbuild
> dependency generator too.

Note however that I explicitly prevent the perl(HTML::Template) Provides version from becoming 2.91 and force it to 2.10:

+%global         __provides_exclude ^perl\\(HTML::Template\\)\\s*=\\s*2\\.91$
+Provides:       perl(HTML::Template) = %{version}

Comment 8 Fedora Update System 2011-09-01 04:21:30 UTC
perl-HTML-Template-2.10-3.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/perl-HTML-Template-2.10-3.fc16

Comment 9 Fedora Update System 2011-09-01 19:03:17 UTC
Package perl-HTML-Template-2.10-3.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing perl-HTML-Template-2.10-3.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/perl-HTML-Template-2.10-3.fc16
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2011-09-09 17:02:11 UTC
perl-HTML-Template-2.10-3.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.