~apachelogger/software-properties/python-apt-is-like

« back to all changes in this revision

Viewing changes to softwareproperties/ppa.py

  • Committer: Harald Sitter
  • Date: 2016-11-09 12:32:22 UTC
  • Revision ID: sitter@kde.org-20161109123222-gu354dsfsel6bknk
* Use is_like from python-apt to determine whether or not distros
  are compatible. This act as additional constraint to the changes
  introduced in 0.96.24.2 enforcing higher accuracy on whether a
  derivate ought to be considered compatible or not.
  + Bump python-apt requirement to 1.1.0~beta5 to have is_like.

Show diffs side-by-side

added added

removed removed

Lines of Context:
395
395
    def info(self):
396
396
        return self._info
397
397
 
398
 
    def expand(self, codename, distro=None):
 
398
    def expand(self, codename, distro=None, distro_is_like=[]):
399
399
        if (distro is not None
400
400
                and distro != self._info["distribution"]
401
 
                and not series_valid_for_distro(self._info["distribution"], codename)):
 
401
                and not series_valid_for_distro(self._info["distribution"], codename)
 
402
                and not self._info["distribution"] in distro_is_like):
402
403
            # The requested PPA is for a foreign distribution.  Guess that
403
404
            # the user wants that distribution's current series.
404
405
            # This only applies if the local distribution is not the same