diff options
author | Remi Collet <fedora@famillecollet.com> | 2014-07-27 17:46:16 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2014-07-27 17:46:16 +0200 |
commit | 54774535fd7e067722a2cacc87faf30214ab9f5e (patch) | |
tree | 9f26fbf82322d3b311cbd28a95da04ac4fef8b82 /refresh.php | |
parent | e179552080b91ee49a10bbe8fce5ca2e7d1397c4 (diff) |
Add Packagist parser
Diffstat (limited to 'refresh.php')
-rw-r--r-- | refresh.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/refresh.php b/refresh.php index 37895cf..cff4d03 100644 --- a/refresh.php +++ b/refresh.php @@ -49,8 +49,8 @@ require "include/main.php"; require "class/CommonTable.php"; if ($_SERVER['argc']>1 && in_array('help', $_SERVER['argv'])) { - echo "Options in: owner R pear pecl optimize repo old empty\n"; - echo "Defaults: owner R pear pecl optimize repo \n"; + echo "Options in: owner pkgist R pear pecl optimize repo old empty\n"; + echo "Defaults: owner pkgist R pear pecl optimize repo \n"; die("\n"); } @@ -62,7 +62,9 @@ try { // ------------------------------------------------------------------- echo date("r : ") . "Refreshing " . MYBASE . " database\n"; + $pkgist = new TablePackagist($db); $rpmtable = new TableRpm($db); + if ($_SERVER['argc']==1 || in_array('repo', $_SERVER['argv'])) { $crit = array('id' => '>0'); @@ -78,7 +80,7 @@ try { Parser::readRpm($rpmtable, new TableRpmRepo($db), $crit); $crit['id'] = '<0'; - Parser::readProvides(new TablePackagist($db), new TableRpmRepo($db), $crit); + Parser::readProvides($pkgist, new TableRpmRepo($db), $crit); } // ------------------------------------------------------------------- @@ -87,6 +89,12 @@ try { $uptable = new TableUpstream($db); // ------------------------------------------------------------------- + if ($_SERVER['argc']==1 || in_array('pkgist', $_SERVER['argv'])) { + + Parser::readPackagist($uptable, $pkgist); + } + + // ------------------------------------------------------------------- if ($_SERVER['argc']==1 || in_array('pecl', $_SERVER['argv'])) { Parser::readPecl($uptable, 'http://pecl.php.net/xmlrpc.php'); |