mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-10 08:21:29 +00:00
* requestsync: Check if user is a member of ubuntu-core-dev if sync request
is for a package in main.
This commit is contained in:
parent
6d1aa801fe
commit
ff50620915
4
debian/changelog
vendored
4
debian/changelog
vendored
@ -1,6 +1,8 @@
|
|||||||
ubuntu-dev-tools (0.38ubuntu1) intrepid; urgency=low
|
ubuntu-dev-tools (0.38ubuntu1) intrepid; urgency=low
|
||||||
|
|
||||||
* Changes go here.
|
[ Jonathan Patrick Davies ]
|
||||||
|
* requestsync: Check if user is a member of ubuntu-core-dev if sync request
|
||||||
|
is for a package in main.
|
||||||
|
|
||||||
-- Jonathan Patrick Davies <jpds@ubuntu.com> Tue, 12 Aug 2008 14:52:34 +0100
|
-- Jonathan Patrick Davies <jpds@ubuntu.com> Tue, 12 Aug 2008 14:52:34 +0100
|
||||||
|
|
||||||
|
28
requestsync
28
requestsync
@ -38,27 +38,36 @@ import common
|
|||||||
|
|
||||||
launchpad_cookiefile = common.prepareLaunchpadCookie()
|
launchpad_cookiefile = common.prepareLaunchpadCookie()
|
||||||
|
|
||||||
def checkNeedsSponsorship():
|
def checkNeedsSponsorship(component):
|
||||||
"""
|
"""
|
||||||
Check that the user has the appropriate permissions by checking what
|
Check that the user has the appropriate permissions by checking what
|
||||||
Launchpad returns while authenticating with their cookie.
|
Launchpad returns while authenticating with their cookie.
|
||||||
|
|
||||||
If they are an indirect or direct member of the ~ubuntu-dev team on
|
If they are an indirect or direct member of the ~ubuntu-dev team on
|
||||||
Launchpad - sponsorship is not required.
|
Launchpad - sponsorship is not required if the package is in the
|
||||||
|
universe / multiverse component.
|
||||||
|
|
||||||
|
If they are in the ~ubuntu-core-dev team, no sponsorship required.
|
||||||
|
|
||||||
The prepareLaunchpadCookie function above shall ensure that a cookie
|
The prepareLaunchpadCookie function above shall ensure that a cookie
|
||||||
file exists first.
|
file exists first.
|
||||||
"""
|
"""
|
||||||
urlopener = common.setupLaunchpadUrlOpener(launchpad_cookiefile)
|
urlopener = common.setupLaunchpadUrlOpener(launchpad_cookiefile)
|
||||||
|
|
||||||
ubuntuDevLPPage = urlopener.open('https://launchpad.net/~ubuntu-dev').read()
|
if component in ['main', 'restricted']:
|
||||||
|
team = "ubuntu-core-dev"
|
||||||
|
sponsor = "ubuntu-main-sponsors"
|
||||||
|
teamLPPage = urlopener.open('https://launchpad.net/~%s').read()
|
||||||
|
else:
|
||||||
|
team = "ubuntu-dev"
|
||||||
|
sponsor = "ubuntu-universe-sponsors"
|
||||||
|
teamLPPage = urlopener.open('https://launchpad.net/~%s').read()
|
||||||
|
|
||||||
if 'You are not a member of this team:' in ubuntuDevLPPage:
|
if 'You are not a member of this team:' in teamLPPage:
|
||||||
print "You are not a member (direct or indirect) of the ~ubuntu-dev " \
|
print "You are not a member (direct or indirect) of the %s " \
|
||||||
"team on Launchpad."
|
"team on Launchpad." % team
|
||||||
print "Your sync request shall require an approval by a member of " \
|
print "Your sync request shall require an approval by a member of " \
|
||||||
"either the ubuntu-main-sponsors or the ubuntu-universe-sponsors " \
|
"the %s team." % sponsor
|
||||||
"team,"
|
|
||||||
print "before it is processed by a member of the Ubuntu Archive admins."
|
print "before it is processed by a member of the Ubuntu Archive admins."
|
||||||
return True # Sponsorship required.
|
return True # Sponsorship required.
|
||||||
else:
|
else:
|
||||||
@ -399,7 +408,6 @@ if __name__ == '__main__':
|
|||||||
if not use_lp_bugs and not get_email_address():
|
if not use_lp_bugs and not get_email_address():
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
sponsorship = checkNeedsSponsorship()
|
|
||||||
|
|
||||||
(srcpkg, release) = args[:2]
|
(srcpkg, release) = args[:2]
|
||||||
force_base_ver = None
|
force_base_ver = None
|
||||||
@ -411,6 +419,8 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
debiancomponent = debian_component(srcpkg)
|
debiancomponent = debian_component(srcpkg)
|
||||||
deb_version = cur_deb_version(srcpkg)
|
deb_version = cur_deb_version(srcpkg)
|
||||||
|
|
||||||
|
sponsorship = checkNeedsSponsorship(component)
|
||||||
|
|
||||||
if deb_version == cur_ver:
|
if deb_version == cur_ver:
|
||||||
print 'The versions in Debian and Ubuntu are the same already (%s). Aborting.' % (deb_version,)
|
print 'The versions in Debian and Ubuntu are the same already (%s). Aborting.' % (deb_version,)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user