SilverWav's Journal

The best is yet to come…

Note: getPublishedSources

leave a comment »

Saved for reference.

Celso Providelo

Sources can be found, basically, by name, version, distroseries and status by calling getPublishedSources on a target archive.

When it run, the output is:

firefox-3.5 3.5~b4~hg20090415r24712+nobinonly-0ubuntu1~umd1 in jaunty

 >>> def test_source_lookup(lp):
     ppa = lp.people['ubuntu-mozilla-daily'].archive
     ubuntu = lp.distributions['ubuntu']
     jaunty = ubuntu.getSeries(name_or_version='jaunty')
     last_firefox = ppa.getPublishedSources(
         source_name='firefox-3.5', status='Published', distro_series=jaunty,
     print last_firefox.displayname


Note: displayname gives an error message, use this instead:

print last_firefox.source_package_version

Written by SilverWav

April 27, 2010 at 2:58 pm

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: