diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-01-23 16:54:34 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-01-23 16:54:34 +0100 |
| commit | 166f645a65b1230cfb58f359e3c70c441b9fe09b (patch) | |
| tree | 35300f18a87c580317fbad2c976d2132d59082a3 /UpdateManager | |
| parent | b4b3505f21186e7325d1282d2aa62f92104e8208 (diff) | |
| download | python-apt-166f645a65b1230cfb58f359e3c70c441b9fe09b.tar.gz | |
* don't update to a unsupported dist
Diffstat (limited to 'UpdateManager')
| -rw-r--r-- | UpdateManager/MetaRelease.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/UpdateManager/MetaRelease.py b/UpdateManager/MetaRelease.py index d99e9ae9..451c48f0 100644 --- a/UpdateManager/MetaRelease.py +++ b/UpdateManager/MetaRelease.py @@ -43,7 +43,7 @@ class MetaRelease(gobject.GObject): # some constants METARELEASE_URI = "http://changelogs.ubuntu.com/meta-release" - #METARELEASE_URI = "http://people.ubuntu.com/~mvo/dist-upgrader/meta-release-test" + #METARELEASE_URI = "http://people.ubuntu.com/~mvo/dist-upgrader/meta-release-test.save" METARELEASE_FILE = "/var/lib/update-manager/meta-release" __gsignals__ = { @@ -97,6 +97,7 @@ class MetaRelease(gobject.GObject): while step_result: if index_tag.Section.has_key("Dist"): name = index_tag.Section["Dist"] + #print name rawdate = index_tag.Section["Date"] date = time.mktime(rfc822.parsedate(rawdate)) supported = index_tag.Section["Supported"] @@ -118,10 +119,10 @@ class MetaRelease(gobject.GObject): print "current dist not found in meta-release file" return False - # then see what we can upgrade to + # then see what we can upgrade to (only upgrade to supported dists) upgradable_to = "" for dist in dists: - if dist.date > current_dist.date: + if dist.date > current_dist.date and dist.supported == True: upgradable_to = dist #print "new dist: %s" % upgradable_to break @@ -129,7 +130,7 @@ class MetaRelease(gobject.GObject): # only warn if unsupported and a new dist is available (because # the development version is also unsupported) if upgradable_to != "" and not current_dist.supported: - self.emit("dist_no_longer_supported",upgradable_to) + self.emit("dist_no_longer_supported",upgradabl_to) elif upgradable_to != "": self.emit("new_dist_available",upgradable_to) |
