[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#733489: python-apt: Improve 'Dependency' and 'BaseDependency' to get target package versions that satisfy dependencies




On 01/06/2014 02:04 PM, Julian Andres Klode wrote:
Outside the Debian world, the Debian style is not used. The style
used here is just the common ASCII mathematical notation.

Oh. Right!
Now that you mention it APT also supports RPMs and thus it would make sense to use the math-notation. Got it! Thanks!

No. It would have to be in both.

Right. Makes sense. So you would propose to add the properties apt_pkg.Dependency.comp_type_deb and apt.package.BaseDependency.relation_deb?

Fixed. And it also uses !=, apt's source code tells me.

Makes sense. Thanks for updating the documentation. I have one nitpick though... apt_pkg.Dependency doesn't list "<".

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)

You didn't answer this one. Do you think this is a bug?


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.

Actually you did write it. ;-)
http://anonscm.debian.org/gitweb/?p=apt/python-apt.git;a=commit;h=28fcce3fe36ab2c3855d4c3766490272a7310392

Can you elaborate what's the rationale behind this compatibility code?


Reply to: