Ubuntu Pastebin

Paste from bdmurray at Wed, 13 May 2015 18:34:39 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/python

# This enables detailed traces of requests launchpadlib makes. This can be
# worthwhile for debugging issues or optimizing performance. from
# https://help.launchpad.net/API/Examples
# import httplib2
# httplib2.debuglevel = 1

from launchpadlib.launchpad import Launchpad

if __name__ == '__main__':
    lp = Launchpad.login_anonymously('apport-retrace',
                                     'production',
                                     version='devel')
    ubuntu = lp.distributions['ubuntu']
    wily = ubuntu.getSeries(name_or_version='wily')
    wily_amd64 = wily.getDistroArchSeries(archtag='amd64')
    archive = ubuntu.main_archive
    for version in ['5.1.1-5ubuntu1', '5.1.1-5ubuntu3']:
        pbs = archive.getPublishedBinaries(binary_name='cpp-5',
            distro_arch_series=wily_amd64, version=version,
            exact_match=True)
        print('cpp-5: %s' % version)
        for pb in pbs:
            urls = pb.binaryFileUrls()
            if not urls:
                print("  No binaryFileUrls available")
            for url in urls:
                print("  %s" % url)
Download as text