#!/usr/bin/python -tt from fedora.client import PackageDB pkgdb = PackageDB() orphan_pkgs = pkgdb.send_request('/packages/orphans/', req_params = {'tg_paginate_limit': 0}).pkgs print len(orphan_pkgs) # Caveat, this includes packages orphaned in non-EOL releases. For instance, # orphaned in EPEL-5 but still owned in devel. This type of code will keep those out: # # for pkg in orphan_pkgs: # for listing in pkg['listings']: # # 8 is the collectionid of Fedora-devel and 3 is the statuscode for # # Active (non-orphan/retired) packages # if listing['collectionid'] == 8 and listing['statuscode'] != 3 : # print pkg['name'] # continue for pkg in orphan_pkgs: print pkg['name']