mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 23:51:08 +00:00
requestsync: Use debian_bundle.changelog.Version for version comparison in debian_changelog. Fixes cases where the current ubuntu version is not in debian anymore, e.g. p7zip-rar 4.55~ds.1-2
This commit is contained in:
parent
5401bffe45
commit
befa4c0850
4
debian/changelog
vendored
4
debian/changelog
vendored
@ -11,8 +11,10 @@ ubuntu-dev-tools (0.26) UNRELEASED; urgency=low
|
||||
When interaction is not required, ask the user if she wants to edit.
|
||||
(LP: #190351)
|
||||
* Exit, if versions in Ubuntu and Debian are the same already.
|
||||
* Use debian_bundle.changelog.Version for version comparison in
|
||||
debian_changelog.
|
||||
|
||||
-- Daniel Hahler <ubuntu@thequod.de> Sat, 09 Feb 2008 02:23:44 +0100
|
||||
-- Daniel Hahler <ubuntu@thequod.de> Sat, 09 Feb 2008 18:27:06 +0100
|
||||
|
||||
ubuntu-dev-tools (0.25) hardy; urgency=low
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
# License: GPLv2, see /usr/share/common-licenses/GPL
|
||||
|
||||
import os, sys, urllib, subprocess, getopt
|
||||
from debian_bundle.changelog import Version
|
||||
|
||||
def cur_version_component(sourcepkg, release):
|
||||
'''Determine current package version in ubuntu.'''
|
||||
@ -54,13 +55,17 @@ def debian_changelog(sourcepkg, component, version):
|
||||
'''Return the Debian changelog from the latest up to the given version
|
||||
(exclusive).'''
|
||||
|
||||
base_version = Version(version)
|
||||
|
||||
ch = ''
|
||||
subdir = sourcepkg[0]
|
||||
if sourcepkg.startswith('lib'):
|
||||
subdir = 'lib%s' % sourcepkg[3]
|
||||
for l in urllib.urlopen('http://packages.debian.org/changelogs/pool/%s/%s/%s/current/changelog.txt' % (component, subdir, sourcepkg)):
|
||||
if l.startswith(sourcepkg) and l.find(version + ')') > 0:
|
||||
break
|
||||
if l.startswith(sourcepkg):
|
||||
ch_version = l[ l.find("(")+1 : l.find(")") ]
|
||||
if Version(ch_version) <= base_version:
|
||||
break
|
||||
ch += l
|
||||
|
||||
return ch
|
||||
|
Loading…
x
Reference in New Issue
Block a user