Does not correctly interpretes "<"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-apt (Debian) |
Fix Released
|
Undecided
|
Unassigned | ||
python-apt (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: python-apt
I realized apt_pkg.check_dep does not correctly interpretes "<" as strictly minor, while apt_pkg.
I attached a test case showing that, here's its output:
comparison type is <
0.9.9-2 < 0.9.9-1 : False
0.9.9-0 < 0.9.9-1 : True
0.9.9-1 < 0.9.9-1 : True (!!!)
0.9.9-1 << 0.9.9-1 : False
As you can see, it says 0.9.9-1 is minor than itself, which is false. It behaves correctly if comparison type is set to "<<".
I think apt_pkg.
You know that the Ubuntu version does not have the new API yet. But I guess we can at least change the new API one without breaking much compatibility; because most programs have not been updated yet (and there are not much using this part of the API anyway).
The problem lies in the fact that some things use CompType which returns the standard comparison operators '<' and '>'; whereas others use CompTypeDeb which returns Debian operators '<<' and '>>' defined in the Policy.
I could
(a) change apt_pkg.check_dep to convert '>'/'<' to '>>' / '<<'; while adding a parameter 'debianized' which accepts
'<' and '>' in their Debian meaning (le; ge).
(b) change all other places to return '<<' / '>>'.
For GDebi in Ubuntu, you should fix the program instead. Dependency.CompType has always returned '<' and '>>', and never the CompTypeDeb one.