2009-08-04 13:43:31 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
#
|
|
|
|
# lp.py - methods used by requestsync while interacting
|
|
|
|
# directly with Launchpad
|
|
|
|
#
|
|
|
|
# Copyright © 2009 Michael Bienia <geser@ubuntu.com>
|
|
|
|
#
|
2009-08-05 23:10:05 +02:00
|
|
|
# This module may contain code written by other authors/contributors to
|
|
|
|
# the main requestsync script. See there for their names.
|
|
|
|
#
|
2009-08-04 13:43:31 +02:00
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
2009-08-05 23:10:05 +02:00
|
|
|
# as published by the Free Software Foundation; version 2
|
2009-08-04 13:43:31 +02:00
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
2009-08-05 23:10:05 +02:00
|
|
|
# Please see the /usr/share/common-licenses/GPL-2 file for the full text
|
2009-08-04 13:43:31 +02:00
|
|
|
# of the GNU General Public License license.
|
|
|
|
|
|
|
|
from ..lp.lpapiwrapper import Distribution
|
|
|
|
from ..lp.udtexceptions import *
|
|
|
|
|
|
|
|
def getDebianSrcPkg(name, release):
|
|
|
|
debian = Distribution('debian')
|
|
|
|
debian_archive = debian.getArchive()
|
|
|
|
|
|
|
|
# Map 'unstable' to 'sid' as LP doesn't know 'unstable' but only 'sid'
|
|
|
|
if release == 'unstable':
|
|
|
|
release = 'sid'
|
|
|
|
|
|
|
|
return debian_archive.getSourcePackage(name, release)
|