Skip to content

Instantly share code, notes, and snippets.

@vpavlin
Created May 11, 2016 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vpavlin/009fab69a25ada53545988139e2fb65c to your computer and use it in GitHub Desktop.
Save vpavlin/009fab69a25ada53545988139e2fb65c to your computer and use it in GitHub Desktop.
    kojiclient = koji.ClientSession('http://koji.fedoraproject.org/kojihub', {})
    r = kojiclient.search("osbs-client", "package", "glob")
    r = kojiclient.listBuilds(r[0]["id"])
    for b in r:
        if b["version"] == "0.23":
            l = kojiclient.listBuildRPMs(b["build_id"])
            for i in l:
                if i["arch"] == "src":
                    print("https://kojipkgs.fedoraproject.org//packages/%s/%s/%s/%s/%s.src.rpm" %(i["name"], i["version"], i["release"], i["arch"], i["nvr"]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment