[three]Bean
Are my Fedora packages handled by Upstream Release Monitoring?
May 02, 2012 | categories: python, fedora View CommentsI just recently started packaging up a bunch of stuff for Fedora 17 and have had to learn the ins-and-outs of package review. The final step in the how-to-get-your-package-into-Fedora story is to enable upstream release monitoring for your package.
I'd forgotten to do this a few times. Oop! So I wrote the following little script to ask pkgdb for all my packages, compare them against the list of monitored packages, and print the result. Maybe you'll find it useful:
#!/usr/bin/env python """ List the Fedora packages I own by their status in Upstream Release Monitoring. Requires python-fedora:: $ sudo yum install python-fedora """ import fedora.client import requests from kitchen.text.converters import to_unicode import os URL = "http://fedoraproject.org/wiki/Upstream_release_monitoring" symbols = { False: ' - ', True: ' + ', } if __name__ == '__main__': pkgdb = fedora.client.PackageDB() username = os.environ.get("BODHI_USER") print "* Packages for FAS user %r" % username pkgs = pkgdb.user_packages(username).pkgs # Bypass varnish cache -> http://bit.ly/XF4YBy headers = {'Cookie': 'this-is-not-a-cookie'} page = requests.get(URL, headers=headers).text for pkg in pkgs: print symbols[pkg.name in page], pkg.name