VersionCheck.php does not compare versions correctly

VERIFIED FIXED

Status

--
critical
VERIFIED FIXED
12 years ago
3 years ago

People

(Reporter: fligtar, Assigned: morgamic)

Tracking

({fixed1.8.1})

unspecified
fixed1.8.1
Bug Flags:
blocking-firefox2 +

Details

(Whiteboard: [server side], URL)

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
http://lxr.mozilla.org/mozilla/source/webtools/update/update/VersionCheck.php

VersionCheck does not use our inc_version_comparison.php functions to compare versions, and as a result does not always show the latest available version to an add-on.

We have run into this problem frequently lately with minversions like 2.0b1, 2.0b2, Deer Park and a maxversion of 2.0.0.*. VersionCheck will return the latest "compatible" version, or if there is none, will be empty.

I can't provide a good example URL because I've been setting minversions to 2.0 as people complain so that they'll be fixed.
(Assignee)

Updated

12 years ago
Severity: critical → blocker
Status: NEW → ASSIGNED
Flags: blocking-firefox2?

Updated

12 years ago
Severity: blocker → critical
(Assignee)

Comment 1

12 years ago
Created attachment 242133 [details] [diff] [review]
Diff to remove dependence on SQL sorting of appVersion.

This should fix the problems caused by version comparison in SQL.  The assumption here is that pulling the latest overall version is desirable -- and I think it is in almost every case.

The edge case is when someone has an outdated version and they can only go up to a mid-way version for an extension.  So, if someone had Fx 1.5 and they had updates for Flashgot, but the newest Flashgot required Fx 2.0 we'd have a problem.  They couldn't update to, for example, 2 versions lower than the most recent.  They could only update to the latest.

The alternative to fix this edge case would be to pull N versions from the database in order to loop through them and run NS_CompareVersions() on each instance.  I don't think that scales, and I'm not interested in doing that because it's not worth the effort or the perf cost.
Assignee: nobody → morgamic
Attachment #242133 - Flags: first-review?(fligtar)
(Reporter)

Comment 2

12 years ago
Comment on attachment 242133 [details] [diff] [review]
Diff to remove dependence on SQL sorting of appVersion.

I think we should try to come up with a way to deal with exception you mentioned, but it's more important to get this bug's problem fixed ASAP.

r=fligtar
Attachment #242133 - Flags: first-review?(fligtar) → first-review+
Flags: blocking-firefox2? → blocking-firefox2+
Whiteboard: [server side]
(Assignee)

Comment 3

12 years ago
Guys -- you see any reason why we can't push this today?
(Assignee)

Updated

12 years ago
Depends on: 356613

Comment 5

12 years ago
Verified.
The case above works for both the case when I set 2.0b1-2.0.0.* and 2.0b1-3.0a1
Status: RESOLVED → VERIFIED
(Reporter)

Comment 6

12 years ago
*** Bug 354890 has been marked as a duplicate of this bug. ***

Updated

12 years ago
Keywords: fixed1.8.1
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.