sponsor-patch: Support syncs of new packages.

This commit is contained in:
Stefano Rivera 2012-02-15 15:05:46 +02:00
parent 03e13834b9
commit aafcbd082e
2 changed files with 14 additions and 2 deletions

4
debian/changelog vendored
View File

@ -3,7 +3,9 @@ ubuntu-dev-tools (0.139) UNRELEASED; urgency=low
[ Stefano Rivera ] [ Stefano Rivera ]
* syncpackage, backportpackage, sponsor-patch: Use -nc when building source * syncpackage, backportpackage, sponsor-patch: Use -nc when building source
packages. Avoids needing build-deps on the build machine. packages. Avoids needing build-deps on the build machine.
* sponsor-patch: Determine the task from the UDD branch. * sponsor-patch:
- Determine the task from the UDD branch.
- Support syncs of new packages.
* Re-add dgetlp. Still needed for downloading source packages from +queue. * Re-add dgetlp. Still needed for downloading source packages from +queue.
(LP: #919805) (LP: #919805)
* pbuilder-dist: Export DISTRIBUTION and ARCHITECTURE as well as DIST and * pbuilder-dist: Export DISTRIBUTION and ARCHITECTURE as well as DIST and

View File

@ -53,6 +53,12 @@ class BugTask(object):
self.project = components[1].lower() self.project = components[1].lower()
self.series = components[2].lower() self.series = components[2].lower()
if self.package is None:
title_re = '^Sync ([a-z0-9+.-]+) [a-z0-9.+:~-]+ \([a-z]+\) from.*'
match = re.match(title_re, self.get_bug_title(), re.U | re.I)
if match is not None:
self.package = match.group(1)
def download_source(self): def download_source(self):
source_files = self.get_source().sourceFileUrls() source_files = self.get_source().sourceFileUrls()
dsc_file = "" dsc_file = ""
@ -150,7 +156,11 @@ class BugTask(object):
return debian.debian_support.Version(source_package_version) return debian.debian_support.Version(source_package_version)
def get_latest_released_version(self): def get_latest_released_version(self):
version = self.get_source(True).source_package_version source = self.get_source(True)
if source is None: # Not currently published in Ubuntu
version = '~'
else:
version = source.source_package_version
return debian.debian_support.Version(version) return debian.debian_support.Version(version)
def is_complete(self): def is_complete(self):