Debian source publication records are all Published now, not pending

(LP: #845487)
This commit is contained in:
Stefano Rivera 2011-09-09 19:11:48 +02:00
parent 8543e3c5f9
commit 6ee66a6efc
3 changed files with 5 additions and 14 deletions

2
debian/changelog vendored
View File

@ -5,6 +5,8 @@ ubuntu-dev-tools (0.131) UNRELEASED; urgency=low
(LP: #844992)
* import-bug-from-debian: Bugs are filed against source packages in Ubuntu.
(LP: #844734)
* Debian source publication records are all Published now, not pending
(LP: #845487)
[ Colin Watson ]
* syncpackage: Fix typo.

View File

@ -302,22 +302,12 @@ class Archive(BaseWrapper):
else:
series = dist.getDevelopmentSeries()
# NOTE:
# For Debian all source publication are in the state 'Pending' so
# filter on this instead of 'Published'. As the result is sorted
# also by date the first result will be the most recent one
# (i.e. the one we are interested in).
if dist.name in ('debian',):
state = 'Pending'
else:
state = 'Published'
if (name, series.name, pocket) not in self._srcpkgs:
try:
srcpkg = self.getPublishedSources(source_name=name,
distro_series=series(),
pocket=pocket,
status=state,
status='Published',
exact_match=True)[0]
index = (name, series.name, pocket)
self._srcpkgs[index] = SourcePackagePublishingHistory(srcpkg)

View File

@ -100,18 +100,17 @@ class BugTask(object):
series = distro_info.DebianDistroInfo().testing()
else:
series = distro_info.DebianDistroInfo().devel()
status = "Pending"
else:
project = self.project
series = self.get_series(latest_release)
status = "Published"
dist = self.launchpad.distributions[project]
archive = dist.getArchive(name="primary")
distro_series = dist.getSeries(name_or_version=series)
published = archive.getPublishedSources(source_name=self.package,
distro_series=distro_series,
status=status, exact_match=True)
status="Published",
exact_match=True)
latest_source = None
for source in published: