mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-26 18:31:10 +00:00
syncpackage: Fix extraction of upstream version for debian versions that
contain more than one dash.
This commit is contained in:
parent
1e7993df3e
commit
477e6a9430
4
debian/changelog
vendored
4
debian/changelog
vendored
@ -13,6 +13,8 @@ ubuntu-dev-tools (0.101) UNRELEASED; urgency=low
|
|||||||
[ Benjamin Drung ]
|
[ Benjamin Drung ]
|
||||||
* Bump Standards-Version to 3.9.0 (no changes required).
|
* Bump Standards-Version to 3.9.0 (no changes required).
|
||||||
* Switch to dpkg-source 3.0 (native) format.
|
* Switch to dpkg-source 3.0 (native) format.
|
||||||
|
* syncpackage: Fix extraction of upstream version for debian versions that
|
||||||
|
contain more than one dash.
|
||||||
|
|
||||||
[ Michael Bienia ]
|
[ Michael Bienia ]
|
||||||
* Add "import-bug-from-debian" written by James Westby.
|
* Add "import-bug-from-debian" written by James Westby.
|
||||||
@ -20,7 +22,7 @@ ubuntu-dev-tools (0.101) UNRELEASED; urgency=low
|
|||||||
* requestsync: Fix bug where the variable 'hasLP' is not always set
|
* requestsync: Fix bug where the variable 'hasLP' is not always set
|
||||||
(lp: #607874).
|
(lp: #607874).
|
||||||
|
|
||||||
-- Michael Bienia <geser@ubuntu.com> Tue, 20 Jul 2010 19:44:18 +0200
|
-- Benjamin Drung <bdrung@ubuntu.com> Wed, 28 Jul 2010 16:23:58 +0200
|
||||||
|
|
||||||
ubuntu-dev-tools (0.100) maverick; urgency=low
|
ubuntu-dev-tools (0.100) maverick; urgency=low
|
||||||
|
|
||||||
|
17
syncpackage
17
syncpackage
@ -151,6 +151,21 @@ def add_fixed_bugs(changes, bugs, verbose=False):
|
|||||||
|
|
||||||
return "\n".join(changes + [""])
|
return "\n".join(changes + [""])
|
||||||
|
|
||||||
|
def extract_upstream_version(debian_version):
|
||||||
|
# remove last part separated by a dash (1.0-2 -> 1.0)
|
||||||
|
parts = debian_version.split('-')
|
||||||
|
if len(parts) > 1:
|
||||||
|
del parts[-1]
|
||||||
|
upstream_version = '-'.join(parts)
|
||||||
|
|
||||||
|
# remove epoch
|
||||||
|
parts = upstream_version.split(':')
|
||||||
|
if len(parts) > 1:
|
||||||
|
del parts[0]
|
||||||
|
upstream_version = ':'.join(parts)
|
||||||
|
|
||||||
|
return upstream_version
|
||||||
|
|
||||||
def sync_dsc(dscurl, debian_dist, release, name, email, bugs, keyid=None, verbose=False):
|
def sync_dsc(dscurl, debian_dist, release, name, email, bugs, keyid=None, verbose=False):
|
||||||
assert dscurl.endswith(".dsc")
|
assert dscurl.endswith(".dsc")
|
||||||
dscname = os.path.basename(dscurl)
|
dscname = os.path.basename(dscurl)
|
||||||
@ -238,7 +253,7 @@ def sync_dsc(dscurl, debian_dist, release, name, email, bugs, keyid=None, verbos
|
|||||||
map(lambda f: f.download(verbose), fakesync_files)
|
map(lambda f: f.download(verbose), fakesync_files)
|
||||||
|
|
||||||
# change into package directory
|
# change into package directory
|
||||||
directory = srcpkg + '-' + strip_epoch(new_ver).split('-')[0]
|
directory = srcpkg + '-' + extract_upstream_version(new_ver)
|
||||||
if verbose:
|
if verbose:
|
||||||
print "cd " + directory
|
print "cd " + directory
|
||||||
os.chdir(directory)
|
os.chdir(directory)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user