* lpapiwrapper.py:

canUploadPackage(): Assume 'universe' as component if the package doesn't
  exist (yet) in Ubuntu (needed for checking sponsorship when requesting syncs
  of new packages).
* requestsync: use canUploadPackage() from LpApiWrapper
This commit is contained in:
Michael Bienia 2009-06-27 11:58:05 +02:00
parent 47a2274264
commit e139944b3a
3 changed files with 12 additions and 5 deletions

6
debian/changelog vendored
View File

@ -2,7 +2,9 @@ ubuntu-dev-tools (0.75) UNRELEASED; urgency=low
[ Michael Bienia ]
* buildd:
+ Use the LP API for retrying or rescoring builds.
- Use the LP API for retrying or rescoring builds.
* requestsync:
- Fix check for sponsorship when a new package should get synced.
[ Jonathan Davies ]
* update-maintainer:
@ -49,7 +51,7 @@ ubuntu-dev-tools (0.75) UNRELEASED; urgency=low
* requestsync: We need to use the output from madison, not just throw it
away.
-- Iain Lane <laney@ubuntu.com> Mon, 15 Jun 2009 19:17:51 +0100
-- Michael Bienia <geser@ubuntu.com> Sat, 27 Jun 2009 11:56:08 +0200
ubuntu-dev-tools (0.74) karmic; urgency=low

View File

@ -55,7 +55,7 @@ def checkNeedsSponsorship(srcpkg):
If they are in the ~ubuntu-core-dev team, no sponsorship required.
"""
if not lp_functions.canUploadPackage(srcpkg):
if not LpApiWrapper.canUploadPackage(srcpkg):
print "You are not able to upload this package directly to Ubuntu.\n" \
"Your sync request shall require an approval by a member of " \

View File

@ -176,7 +176,8 @@ class LpApiWrapper(object):
per-package upload rights.
'package' can either be a LP representation of a source package
or a string and an Ubuntu series.
or a string and an Ubuntu series. If 'package' doesn't exist
yet in Ubuntu assume 'universe' for component.
'''
if isinstance(package, Entry):
@ -187,7 +188,11 @@ class LpApiWrapper(object):
# Fall-back to current Ubuntu development series
series = cls.getUbuntuDevelopmentSeries()
component = cls.getUbuntuSourcePackage(package, series).component_name
try:
component = cls.getUbuntuSourcePackage(package, series).component_name
except PackageNotFoundException:
# Probably a new package, assume "universe" as component
component = 'universe'
if component not in cls._upload_comp and package not in cls._upload_pkg:
me = cls.getMe()