- Correct bug supervisor team to ubuntu-bugcontrol

- Remove team names from sponsorship message - makes the function much
    simpler

Also check if teams are valid using is_valid.
This commit is contained in:
Iain Lane 2009-05-09 21:08:46 +01:00
parent b4cd975dc8
commit 4b8839ef15
3 changed files with 16 additions and 23 deletions

5
debian/changelog vendored
View File

@ -23,11 +23,14 @@ ubuntu-dev-tools (0.74) UNRELEASED; urgency=low
instead of checking team membership instead of checking team membership
- Default to current development release if no release is specified on - Default to current development release if no release is specified on
commandline commandline
- Correct bug supervisor team to ubuntu-bugcontrol
- Remove team names from sponsorship message - makes the function much
simpler
* buildd * buildd
- Check if user has upload privileges instead of checking for team - Check if user has upload privileges instead of checking for team
membership when seeing if operations are permitted membership when seeing if operations are permitted
-- Iain Lane <laney@ubuntu.com> Sat, 09 May 2009 20:09:28 +0100 -- Iain Lane <laney@ubuntu.com> Sat, 09 May 2009 21:06:52 +0100
ubuntu-dev-tools (0.73) karmic; urgency=low ubuntu-dev-tools (0.73) karmic; urgency=low

View File

@ -60,24 +60,13 @@ def checkNeedsSponsorship(srcpkg):
The prepareLaunchpadCookie function above shall ensure that a cookie The prepareLaunchpadCookie function above shall ensure that a cookie
file exists first. file exists first.
""" """
if component in ['main', 'restricted']:
team = "ubuntu-core-dev"
sponsor = "ubuntu-main-sponsors"
else:
team = "motu"
sponsor = "ubuntu-universe-sponsors"
if not lp_functions.canUploadPackage(srcpkg): if not lp_functions.canUploadPackage(srcpkg):
# Check if they have a per-package upload permission. print "You are not able to upload this package directly to Ubuntu.\n" \
if lp_functions.isPerPackageUploader(args[0]): "Your sync request shall require an approval by a member of " \
return "perpackageupload" "the appropriate sponsorship team, who shall be subscribed to " \
"this bug report.\n" \
print "You are not a member (direct or indirect) of the '%s' " \ "This must be done before it can be processed by a member of " \
"team on Launchpad." % team
print "Your sync request shall require an approval by a member of " \
"the '%s'\nteam, who shall be subscribed to this bug report." % sponsor
print "This must be done before it can be processed by a member of " \
"the Ubuntu Archive team." "the Ubuntu Archive team."
print "If the above is correct please press Enter." print "If the above is correct please press Enter."
raw_input_exit_on_ctrlc() # Abort if necessary. raw_input_exit_on_ctrlc() # Abort if necessary.
@ -384,8 +373,8 @@ def post_bug(source_package, subscribe, status, bugtitle, bugtext):
#newly created bugreports have one task #newly created bugreports have one task
task = bug.bug_tasks[0] task = bug.bug_tasks[0]
# Only members of ubuntu-bugs can set importance # Only members of ubuntu-bugcontrol can set importance
if lp_functions.isLPTeamMember('ubuntu-bugs'): if lp_functions.isLPTeamMember('ubuntu-bugcontrol'):
task.transitionToImportance(importance='Wishlist') task.transitionToImportance(importance='Wishlist')
task.transitionToStatus(status=status) task.transitionToStatus(status=status)
@ -572,7 +561,8 @@ if __name__ == '__main__':
'>>> ENTER_EXPLANATION_HERE <<<\n\n' '>>> ENTER_EXPLANATION_HERE <<<\n\n'
if sponsorship == 'perpackageupload': # Check if they have a per-package upload permission.
if lp_functions.isPerPackageUploader(srcpkg):
report += 'Note that I have per-package upload permissions for %s.\n\n' % srcpkg report += 'Note that I have per-package upload permissions for %s.\n\n' % srcpkg
uidx = base_ver.find('build') uidx = base_ver.find('build')

View File

@ -128,7 +128,7 @@ def _findMember(haystack, needle):
if not haystack.is_team: if not haystack.is_team:
return (str(haystack) == str(needle)) return (str(haystack) == str(needle))
else: # is a team elif haystack.is_valid: # is a team
members = haystack.members members = haystack.members
for m in members: for m in members:
if _findMember(m, needle): if _findMember(m, needle):