Closed Bug 356435 Opened 18 years ago Closed 18 years ago

VersionCheck.php does not compare versions correctly

Categories

(addons.mozilla.org Graveyard :: Public Pages, defect)

defect
Not set
critical

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: fligtar, Assigned: morgamic)

References

()

Details

(Keywords: fixed1.8.1, Whiteboard: [server side])

Attachments

(1 file)

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.
Severity: critical → blocker
Status: NEW → ASSIGNED
Flags: blocking-firefox2?
Severity: blocker → critical
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)
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]
Guys -- you see any reason why we can't push this today?
Depends on: 356613
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
*** Bug 354890 has been marked as a duplicate of this bug. ***
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.

Attachment

General

Created:
Updated:
Size: