Closed Bug 356435 Opened 18 years ago Closed 18 years ago

VersionCheck.php does not compare versions correctly


( Graveyard :: Public Pages, defect)

Not set


(Not tracked)



(Reporter: fligtar, Assigned: morgamic)




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


(1 file)

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
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.

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
The case above works for both the case when I set 2.0b1-2.0.0.* and 2.0b1-3.0a1
*** Bug 354890 has been marked as a duplicate of this bug. ***
Keywords: fixed1.8.1
Product: → Graveyard
You need to log in before you can comment on or make changes to this bug.