diff options
| author | Michael Vogt <egon@top> | 2005-12-06 20:44:05 +0100 |
|---|---|---|
| committer | Michael Vogt <egon@top> | 2005-12-06 20:44:05 +0100 |
| commit | a5be3591b8c7b53422b19575a7b085205763c2c3 (patch) | |
| tree | 77924156b7c34c1b8e6b51dc70073a5e8f956b96 | |
| parent | d2d0e8edec27fddd7216dbd74ee940d34ffdc87c (diff) | |
| download | python-apt-a5be3591b8c7b53422b19575a7b085205763c2c3.tar.gz | |
* a foreign packages must be downloadable
| -rw-r--r-- | DistUpgrade/DistUpgrade.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/DistUpgrade/DistUpgrade.py b/DistUpgrade/DistUpgrade.py index 137fddf5..6f2010db 100644 --- a/DistUpgrade/DistUpgrade.py +++ b/DistUpgrade/DistUpgrade.py @@ -271,18 +271,21 @@ class DistUpgradeControler(object): return True def _getObsoletesPkgs(self): + " get all package names that are not downloadable " obsolete_pkgs =set() for pkg in self._cache: if pkg.isInstalled: - # if it is not downloadable, mark it as obsolete if not self._cache.downloadable(pkg): obsolete_pkgs.add(pkg.name) return obsolete_pkgs def _getForeignPkgs(self): + """ get all packages that are installed from a foreign repo + (and are actually downloadable) + """ foreign_pkgs =set() for pkg in self._cache: - if pkg.isInstalled: + if pkg.isInstalled and self._cache.downloadable(pkg): # assume it is foreign and see if it is from the # official archive foreign=True |
