* @license MIT License, see LICENSE.txt * @link http://svnweb.mageia.org/svn/soft/dashboard/ */ /** */ class Report_Box_SourcePackage extends Report_Box { /** */ var $title = "Source packages"; /** */ function _get_var_definitions() { return array( 'size' => '%5.1fGB', 'count-srpms' => '%d packages', 'upstream-updates' => array('l' => '%d have an update', 't' => '==0'), 'orphans' => array('l' => '%d orphans', 't' => '>0'), 'patches' => '%d patches', 'bugs' => array('l' => '%d open bugs', 't' => '>0'), 'rpmlint' => array('l' => '%d rpmlint errors', 't' => '>0'), ); } /** */ function _get_links() { return 'View svn, youri-check report'; } /** * Uses youri-check updates report (check.mageia.org) */ function _fetch_upstream_updates() { $txt = file('http://check.mageia.org/updates.txt'); return array( 'upstream-updates'=> count($txt) - 5 ); } /** * Uses sophie.zarb.org */ function _fetch_source_packages() { $count = substr_count( file_get_contents('http://sophie.zarb.org/distrib/Mageia/cauldron/i586/srpms?json=1'), 'pkgid' ); return array( 'count-srpms' => $count, ); } }