From 1a1fbf466bec90d8c28fb29b3cafc70480ffa4f2 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 12 May 2006 11:22:30 +0200 Subject: * UpdateManager/UpdateManager.py: - strip the epoch in the changelog download code --- UpdateManager/UpdateManager.py | 13 ++++++++++--- debian/changelog | 3 +++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index 3f556aea..61eea023 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -145,17 +145,24 @@ class MyCache(apt.Cache): #print changelog.read() # do only get the lines that are new alllines = "" - regexp = "^%s \((.*)\)(.*)$" % (srcpkg) + regexp = "^%s \((.*)\)(.*)$" % (re.escape(srcpkg)) i=0 while True: line = changelog.readline() - #print line + print line if line == "": break match = re.match(regexp,line) if match: - if apt_pkg.VersionCompare(match.group(1),pkg.installedVersion) <= 0: + # FIXME: the installed version can have a epoch, but th + # changelog does not have one, we do a dumb + # approach here and just strip it away, but I'm + # sure that this can lead to problems + installed = pkg.installedVersion + if ":" in installed: + installed = installed.split(":",1)[1] + if apt_pkg.VersionCompare(match.group(1),installed) <= 0: break # EOF (shouldn't really happen) alllines = alllines + line diff --git a/debian/changelog b/debian/changelog index 413226f8..6b1ba589 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,9 @@ update-manager (0.42.2ubuntu16) dapper; urgency=low available) when building the changelog URL (ubuntu #40058) * SoftwareProperties/SoftwareProperties.py: - if no config is found create a new one (ubuntu: #37560) + * UpdateManager/UpdateManager.py: + - fix problem in changelog reading code when matching against + installed versions with epochs (ubuntu: #40058) -- Michael Vogt Thu, 11 May 2006 17:33:40 +0200 -- cgit v1.2.3