Bug#733489: python-apt: Improve 'Dependency' and 'BaseDependency' to get target package versions that satisfy dependencies
On Mon, Jan 06, 2014 at 12:31:52PM +0100, Michael Schaller wrote:
> Having two styles explains totally why I'm confused. ^^
> Some more questions/comments regarding this...
>
>
> What do you mean by "it uses the style everyone else uses"?
> Isn't Debian-style THE common denominator? If not, do you have a
> link where I can read more about the "style everyone else uses"?
> Maybe this link should be added to the documentation as background
> information.
Outside the Debian world, the Debian style is not used. The style
used here is just the common ASCII mathematical notation.
>
>
> A comp_type_deb does sound like a good idea but it would need to be
> properly documented so that people understand the difference. I also
> think that this shouldn't be in apt_pkg.Dependency but rather in
> apt.package.BaseDependency. What do you think?
No. It would have to be in both.
>
>
> IMHO the documentation for apt_pkg.Version.comp_type needs fixing
> because it lists ">>" and "==" albeit apt_pkg never uses ">>", "<<"
> or "==". It only uses ['', '>=', '<=', '=', '<', '>'] as you can see
> in my previous post.
Fixed. And it also uses !=, apt's source code tells me.
>
>
> IMHO the documentation for apt.package.BaseDependency needs fixing
> because it lists "==" albeit apt never uses "==". It only uses ['',
> '>=', '<=', '=', '<', '>'] as you can see in my previous post.
> Furthermore it also allows or better said should be able to handle
> "<<" , ">>" and "==" (via apt.package.BaseDependency.__dstr) but
> "<<" and ">>" aren't listed in the docstring.i
Fixed.
>
>
> Can it be that apt.package.BaseDependency.__dstr has a bug?
> Shouldn't __ne__ only use __ne__ calls?
> If you ask me then:
> def __ne__(self, other):
> return str.__eq__(self, other) and str.__ne__(2 * self, other)
>
> should be:
> def __ne__(self, other):
> return str.__ne__(self, other) and str.__ne__(2 * self, other)
>
>
> Am I the only one who thinks that apt.package.BaseDependency.__dstr
> is a really weird helper? Why not just use a dict and translate all
> possible strings to the expected strings? That would IMHO increase
> the readability and would only make the expected strings available.
I don't know. I did not write IIRC.
--
Julian Andres Klode - Debian Developer, Ubuntu Member
See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.
Please do not top-post if possible.
Reply to: