diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-08-15 22:20:33 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-08-15 22:20:33 +0200 |
| commit | d08caea3196550e700db9a1d83fcaa3a8ad35b2d (patch) | |
| tree | 5f4ee753b6f11d5e1b20d120278d74dfd85aa9f0 /DistUpgrade | |
| parent | ed05b0ce09b0199cf1d2b394630c7ff5ad72fa56 (diff) | |
| download | python-apt-d08caea3196550e700db9a1d83fcaa3a8ad35b2d.tar.gz | |
* DistUpgrade/DistUpgradeControler.py:
- always enable "main" on upgrades, this ensures that we do not end up
with a system without the main archive (various bugs for breezy->dapper)
* data/channels/Debian.info, data/channels/Ubuntu.info:
- added pre-generated files (required for the upgrader)
* UpdateManager/Common/aptsources.py:
- add a "matcherPath" parameter to SourcesList (for the upgrader)
Diffstat (limited to 'DistUpgrade')
| -rw-r--r-- | DistUpgrade/DistUpgradeControler.py | 9 | ||||
| l--------- | DistUpgrade/Ubuntu.info | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py index 9842484d..a14ca528 100644 --- a/DistUpgrade/DistUpgradeControler.py +++ b/DistUpgrade/DistUpgradeControler.py @@ -32,7 +32,7 @@ import re import statvfs from DistUpgradeConfigParser import DistUpgradeConfig -from aptsources import SourcesList, SourceEntry, is_mirror +from aptsources import SourcesList, SourceEntry, Distribution, is_mirror from gettext import gettext as _ import gettext from DistUpgradeCache import MyCache @@ -73,6 +73,11 @@ class DistUpgradeControler(object): def rewriteSourcesList(self, mirror_check=True): logging.debug("rewriteSourcesList()") + # enable main (we always need this!) + distro = Distribution() + distro.get_sources(self.sources) + distro.enable_component(self.sources, "main") + # this must map, i.e. second in "from" must be the second in "to" # (but they can be different, so in theory we could exchange # component names here) @@ -143,7 +148,7 @@ class DistUpgradeControler(object): def updateSourcesList(self): logging.debug("updateSourcesList()") - self.sources = SourcesList(withMatcher=False) + self.sources = SourcesList(matcherPath=".") if not self.rewriteSourcesList(mirror_check=True): logging.error("No valid mirror found") res = self._view.askYesNoQuestion(_("No valid mirror found"), diff --git a/DistUpgrade/Ubuntu.info b/DistUpgrade/Ubuntu.info new file mode 120000 index 00000000..171be7e1 --- /dev/null +++ b/DistUpgrade/Ubuntu.info @@ -0,0 +1 @@ +../data/channels/Ubuntu.info
\ No newline at end of file |
