diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-05-12 11:22:30 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-05-12 11:22:30 +0200 |
| commit | 1a1fbf466bec90d8c28fb29b3cafc70480ffa4f2 (patch) | |
| tree | 1fcf168934722ae8cb81853aa40b4fe54a1c2771 | |
| parent | 49ac4006ec43c8a3989192110aeec8c139d80196 (diff) | |
| download | python-apt-1a1fbf466bec90d8c28fb29b3cafc70480ffa4f2.tar.gz | |
* UpdateManager/UpdateManager.py:
- strip the epoch in the changelog download code
| -rw-r--r-- | UpdateManager/UpdateManager.py | 13 | ||||
| -rw-r--r-- | 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 <michael.vogt@ubuntu.com> Thu, 11 May 2006 17:33:40 +0200 |
