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 | |
| 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)
| -rw-r--r-- | DistUpgrade/DistUpgradeControler.py | 9 | ||||
| l--------- | DistUpgrade/Ubuntu.info | 1 | ||||
| -rw-r--r-- | UpdateManager/Common/aptsources.py | 14 | ||||
| -rw-r--r-- | data/channels/Debian.info | 57 | ||||
| -rw-r--r-- | data/channels/Makefile | 4 | ||||
| -rw-r--r-- | data/channels/Ubuntu.info | 264 |
6 files changed, 338 insertions, 11 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 diff --git a/UpdateManager/Common/aptsources.py b/UpdateManager/Common/aptsources.py index fd77fe63..80781cb0 100644 --- a/UpdateManager/Common/aptsources.py +++ b/UpdateManager/Common/aptsources.py @@ -209,10 +209,11 @@ class NullMatcher(object): return True class SourcesList: - def __init__(self, withMatcher=True): + def __init__(self, withMatcher=True, + matcherPath="/usr/share/update-manager/channels/"): self.list = [] # of Type SourceEntries if withMatcher: - self.matcher = SourceEntryMatcher() + self.matcher = SourceEntryMatcher(matcherPath) else: self.matcher = NullMatcher() self.refresh() @@ -378,6 +379,7 @@ class SourceCompTemplate: self.on_by_default = on_by_default class SourceEntryTemplates: + def __init__(self,datadir): _ = gettext.gettext self.templates = [] @@ -411,10 +413,10 @@ class SourceEntryMatcher: self.comps = l_comps self.comps_descriptions = l_comps_descr - def __init__(self): + def __init__(self, matcherPath): self.templates = [] # Get the human readable channel and comp names from the channel .infos - spec_files = glob.glob("/usr/share/update-manager/channels/*.info") + spec_files = glob.glob("%s/*.info" % matcherPath) for f in spec_files: f = os.path.basename(f) i = f.find(".info") @@ -440,9 +442,7 @@ class SourceEntryMatcher: class Distribution: def __init__(self): - """" - Container for distribution specific informations - """ + """ Container for distribution specific informations """ # LSB information self.id = "" self.codename = "" diff --git a/data/channels/Debian.info b/data/channels/Debian.info new file mode 100644 index 00000000..3958607a --- /dev/null +++ b/data/channels/Debian.info @@ -0,0 +1,57 @@ +ChangelogURI: http://packages.debian.org/changelogs/pool/%s/%s/%s/%s_%s/changelog + +Suite: sarge +RepositoryType: deb +BaseURI: http://http.us.debian.org/debian/ +Description: Debian 3.1 "Sarge" +Component: main +Enabled: 1 +CompDescription: Officially supported +Component: contrib +Enabled: 0 +CompDescription: DFSG-compatible Software with Non-Free Dependencies +Component: non-free +Enabled: 0 +CompDescription: Non-DFSG-compatible Software + +Suite: sarge/updates +RepositoryType: deb +BaseURI: http://security.debian.org/ +Description: Debian 3.1 "Sarge" Security Updates +Component: main +Enabled: 1 +CompDescription: Officially supported +Component: contrib +Enabled: 0 +CompDescription: DFSG-compatible Software with Non-Free Dependencies +Component: non-free +Enabled: 0 +CompDescription: Non-DFSG-compatible Software + +Suite: etch +RepositoryType: deb +BaseURI: http://http.us.debian.org/debian/ +Description: Debian "Etch" (testing) +Component: main +Enabled: 1 +CompDescription: Officially supported +Component: contrib +Enabled: 0 +CompDescription: DFSG-compatible Software with Non-Free Dependencies +Component: non-free +Enabled: 0 +CompDescription: Non-DFSG-compatible Software + +Suite: sid +RepositoryType: deb +BaseURI: http://http.us.debian.org/debian/ +Description: Debian "Sid" (unstable) +Component: main +Enabled: 1 +CompDescription: Officially supported +Component: contrib +Enabled: 0 +CompDescription: DFSG-compatible Software with Non-Free Dependencies +Component: non-free +Enabled: 0 +CompDescription: Non-DFSG-compatible Software diff --git a/data/channels/Makefile b/data/channels/Makefile index 3901f9cc..49cc13e1 100644 --- a/data/channels/Makefile +++ b/data/channels/Makefile @@ -5,10 +5,10 @@ INFO_FILES := $(patsubst %.info.in,%.info,$(wildcard *.info.in)) all: $(INFO_FILES) -%.info: %.info.in ../po/$(DOMAIN).pot +%.info: %.info.in sed 's/^_//g' < $< > $@ intltool-extract --type=gettext/rfc822deb $< #intltool-merge -d ../po $< $@ clean: - rm -f $(INFO_FILES) $(wildcard *.h)
\ No newline at end of file + rm -f $(wildcard *.h) diff --git a/data/channels/Ubuntu.info b/data/channels/Ubuntu.info new file mode 100644 index 00000000..99c202ba --- /dev/null +++ b/data/channels/Ubuntu.info @@ -0,0 +1,264 @@ +ChangelogURI: http://changelogs.ubuntu.com/changelogs/pool/%s/%s/%s/%s_%s/changelog + +Suite: edgy +RepositoryType: deb +BaseURI: http://archive.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu/ +Description: Ubuntu 6.10 'Edgy Eft' +Component: main +Enabled: 1 +CompDescription: Officially supported +CompDescriptionLong: OpenSource software that is officially supported by Canonical Ltd. (main) +Component: universe +Enabled: 0 +CompDescription: Community maintained (universe) +CompDescriptionLong: OpenSource software that is maintained by the community (universe) +Component: restricted +Enabled: 1 +CompDescription: Non-free drivers +CompDescriptionLong: Proprietary drivers for devices (restricted) +Component: multiverse +Enabled: 0 +CompDescription: Restricted software (Multiverse) +CompDescriptionLong: Software that is restricted by copyright or legal issues (multiverse) + +Suite: edgy +MatchName: .* +BaseURI: cdrom:\[Ubuntu.*6.10 +Description: Cdrom with Ubuntu 6.10 'Edgy Eft' +Available: False +Component: main +Enabled: 1 +CompDescription: Oficially supported +Component: restricted +Enabled: 1 +CompDescription: Restricted copyright + +Suite: edgy-security +ParentSuite: edgy +RepositoryType: deb +BaseURI: http://security.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu/|security.ubuntu.com +Description: Important security updates + +Suite: edgy-updates +ParentSuite: edgy +RepositoryType: deb +BaseURI: http://archive.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu/ +Description: Recommended updates + +Suite: edgy-backports +ParentSuite: edgy +RepositoryType: deb +BaseURI: http://archive.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu/ +Description: Backported updates + +Suite: dapper +RepositoryType: deb +BaseURI: http://archive.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu/ +Description: Ubuntu 6.06 LTS 'Dapper Drake' +Component: main +Enabled: 1 +CompDescription: Officially supported +CompDescriptionLong: OpenSource software that is officially supported by Canonical Ltd. (main) +Component: universe +Enabled: 0 +CompDescription: Community maintained (universe) +CompDescriptionLong: OpenSource software that is maintained by the community (universe) +Component: restricted +Enabled: 1 +CompDescription: Non-free drivers +CompDescriptionLong: Proprietary drivers for devices (restricted) +Component: multiverse +Enabled: 0 +CompDescription: Restricted software (Multiverse) +CompDescriptionLong: Software that is restricted by copyright or legal issues (multiverse) + +Suite: dapper +MatchName: .* +BaseURI: cdrom:\[Ubuntu.*6.06 +Description: Cdrom with Ubuntu 6.06 LTS 'Dapper Drake' +Available: False +Component: main +Enabled: 1 +CompDescription: Oficially supported +Component: restricted +Enabled: 1 +CompDescription: Restricted copyright + +Suite: dapper-security +ParentSuite: dapper +RepositoryType: deb +BaseURI: http://security.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu/|security.ubuntu.com +Description: Important security updates + +Suite: dapper-updates +ParentSuite: dapper +RepositoryType: deb +BaseURI: http://archive.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu/ +Description: Recommended updates + +Suite: dapper-backports +ParentSuite: dapper +RepositoryType: deb +BaseURI: http://archive.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu/ +Description: Backported updates + +Suite: breezy +RepositoryType: deb +BaseURI: http://archive.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu/ +Description: Ubuntu 5.10 'Breezy Badger' +Component: main +Enabled: 1 +CompDescription: Officially supported +Component: restricted +Enabled: 1 +CompDescription: Restricted copyright +Component: universe +Enabled: 0 +CompDescription: Community maintained (Universe) +Component: multiverse +Enabled: 0 +CompDescription: Non-free (Multiverse) + +Suite: breezy +MatchName: .* +BaseURI: cdrom:\[Ubuntu.*5.10 +Description: Cdrom with Ubuntu 5.10 'Breezy Badger' +Available: False +Component: main +Enabled: 1 +CompDescription: Oficially supported +Component: restricted +Enabled: 1 +CompDescription: Restricted copyright + +Suite: breezy-security +ParentSuite: breezy +RepositoryType: deb +BaseURI: http://security.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu/|security.ubuntu.com +Description: Ubuntu 5.10 Security Updates + +Suite: breezy-updates +ParentSuite: breezy +RepositoryType: deb +BaseURI: http://archive.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu/ +Description: Ubuntu 5.10 Updates + +Suite: breezy-backports +ParentSuite: breezy +RepositoryType: deb +BaseURI: http://archive.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu/ +Description: Ubuntu 5.10 Backports + +Suite: hoary +RepositoryType: deb +BaseURI: http://archive.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu/ +Description: Ubuntu 5.04 'Hoary Hedgehog' +Component: main +Enabled: 1 +CompDescription: Oficially supported +Component: restricted +Enabled: 1 +CompDescription: Restricted copyright +Component: universe +Enabled: 0 +CompDescription: Community maintained (Universe) +Component: multiverse +Enabled: 0 +CompDescription: Non-free (Multiverse) + +Suite: hoary +MatchName: .* +BaseURI: cdrom:\[Ubuntu.*5.04 +Description: Cdrom with Ubuntu 5.04 'Hoary Hedgehog' +Available: False +Component: main +Enabled: 1 +CompDescription: Oficially supported +Component: restricted +Enabled: 1 +CompDescription: Restricted copyright + +Suite: hoary-security +ParentSuite: hoary +RepositoryType: deb +BaseURI: http://security.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu/|security.ubuntu.com +Description: Ubuntu 5.04 Security Updates + +Suite: hoary-updates +ParentSuite: hoary +RepositoryType: deb +BaseURI: http://archive.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu/ +Description: Ubuntu 5.04 Updates + +Suite: hoary-backports +ParentSuite: hoary +RepositoryType: deb +BaseURI: http://archive.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu/ +Description: Ubuntu 5.04 Backports + +Suite: warty +RepositoryType: deb +BaseURI: http://archive.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu/ +Description: Ubuntu 4.10 'Warty Warthog' +Component: main +Enabled: 1 +CompDescription: Oficially supported +Component: restricted +Enabled: 1 +CompDescription: Restricted copyright +Component: universe +Enabled: 0 +CompDescription: Community maintained (Universe) +Component: multiverse +Enabled: 0 +CompDescription: Non-free (Multiverse) + +Suite: warty +MatchName: .* +BaseURI: cdrom:\[Ubuntu.*4.10 +Description: Cdrom with Ubuntu 4.10 'Warty Warthog' +Available: False +Component: main +Enabled: 1 +CompDescription: Oficially supported +Component: restricted +Enabled: 1 +CompDescription: Restricted copyright + +Suite: warty-security +ParentSuite: warty +RepositoryType: deb +BaseURI: http://security.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu/|security.ubuntu.com +Description: Ubuntu 4.10 Security Updates + +Suite: warty-updates +ParentSuite: warty +RepositoryType: deb +BaseURI: http://archive.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu/ +Description: Ubuntu 4.10 Updates + +Suite: warty-backports +ParentSuite: warty +RepositoryType: deb +BaseURI: http://archive.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu/ +Description: Ubuntu 4.10 Backports |
