diff options
author | Remi Collet <fedora@famillecollet.com> | 2014-07-28 09:25:24 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2014-07-28 09:25:24 +0200 |
commit | 0e306b2c719a577f220d1084b481b2f8fcee8d6e (patch) | |
tree | 029d15de22aece519c6ef9aa52291b4c2156c6d7 | |
parent | 6eb9e049223f363ba89fae0e0a34a0aa62cd7a20 (diff) |
checkpkgist: use data retrieved by rpmphp
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | checkpkgist.json | 92 | ||||
-rwxr-xr-x | checkpkgist.php | 29 | ||||
-rwxr-xr-x | get | 2 |
4 files changed, 46 insertions, 78 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6ebac36 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +rpmphp.json diff --git a/checkpkgist.json b/checkpkgist.json index d525450..23f2f8c 100644 --- a/checkpkgist.json +++ b/checkpkgist.json @@ -1,76 +1,18 @@ -/* - CheckPkgist configuration file - - Key: packagist name - Value: RPM name - - Last update: 2014-07-17 -*/ { - "bartlett/php-compatinfo": "php-bartlett-PHP-CompatInfo", - "bartlett/php-reflect": "php-bartlett-PHP-Reflect", - "doctrine/annotations": "php-doctrine-annotations", - "doctrine/cache": "php-doctrine-cache", - "doctrine/collections": "php-doctrine-collections", - "doctrine/common": "php-doctrine-common", - "doctrine/data-fixtures": "php-doctrine-datafixtures", - "doctrine/dbal": "php-doctrine-dbal", - "doctrine/inflector": "php-doctrine-inflector", - "doctrine/lexer": "php-doctrine-lexer", - "doctrine/orm": "php-doctrine-orm", - "fabpot/goutte": "php-goutte", - "fzaninotto/faker": "php-Faker", - "jms/metadata": "php-Metadata", - "jms/parser-lib": "php-JMSParser", - "justinrainbow/json-schema": "php-JsonSchema", - "kriswallsmith/assetic": "php-Assetic", - "klaussilveira/gitter": "php-gitter", - "leafo/scssphp": "php-scssphp", - "michelf/php-markdown": "php-markdown", - "mikey179/vfsStream": "php-mikey179-vfsstream", - "mockery/mockery": "php-deepend-Mockery", - "monolog/monolog": "php-Monolog", - "ocramius/instantiator": "php-ocramius-instantiator", - "ocramius/lazy-map": "php-ocramius-lazy-map", - "psr/log": "php-PsrLog", - "raven/raven": "php-Raven", - "sabberworm/php-css-parser": "php-PHP-CSS-Parser", - "sdboyer/gliph": "php-gliph", - "seld/jsonlint": "php-jsonlint", - "solarium/solarium": "php-solarium", - "symfony/symfony": "php-symfony", - "twig/twig": "php-twig-Twig", - "zendframework/zendframework1": "php-ZendFramework", - "zendframework/zendframework": "php-ZendFramework2", - - "sabre/dav": "php-sabre-dav", - "sabre/event": "php-sabre-event", - "sabre/http": "php-sabre-http", - "sabre/vobject": "php-sabre-vobject", - - "phploc/phploc": "php-phpunit-phploc", - - "phpunit/dbunit": "php-phpunit-DbUnit", - "phpunit/phpcov": "php-phpunit-phpcov", - "phpunit/php-code-coverage": "php-phpunit-PHP-CodeCoverage", - "phpunit/php-file-iterator": "php-phpunit-File-Iterator", - "phpunit/php-invoker": "php-phpunit-PHP-Invoker", - "phpunit/php-text-template": "php-phpunit-Text-Template", - "phpunit/php-timer": "php-phpunit-PHP-Timer", - "phpunit/php-token-stream": "php-phpunit-PHP-TokenStream", - "phpunit/phpunit": "php-phpunit-PHPUnit", - "phpunit/phpunit-mock-objects": "php-phpunit-PHPUnit-MockObject", - "phpunit/phpunit-selenium": "php-phpunit-PHPUnit-Selenium", - "phpunit/phpunit-skeleton-generator": "php-phpunit-PHPUnit-SkeletonGenerator", - "phpunit/phpunit-story": "php-phpunit-PHPUnit-Story", - - "sebastian/comparator": "php-phpunit-comparator", - "sebastian/diff": "php-phpunit-diff", - "sebastian/environment": "php-phpunit-environment", - "sebastian/exporter": "php-phpunit-exporter", - "sebastian/finder-facade": "php-phpunit-FinderFacade", - "sebastian/git": "php-phpunit-git", - "sebastian/phpcpd": "php-phpunit-phpcpd", - "sebastian/phpdcd": "php-phpunit-phpdcd", - "sebastian/version": "php-phpunit-Version", -} + "fabpot\/goutte": "php-goutte", + "jms\/parser-lib": "php-JMSParser", + "justinrainbow\/json-schema": "php-JsonSchema", + "kriswallsmith\/assetic": "php-Assetic", + "michelf\/php-markdown": "php-markdown", + "sabberworm\/php-css-parser": "php-PHP-CSS-Parser", + "solarium\/solarium": "php-solarium", + "twig\/twig": "php-twig-Twig", + "zendframework\/zendframework1": "php-ZendFramework", + "sabre\/dav": "php-sabre-dav", + "phpunit\/phpunit-selenium": "php-phpunit-PHPUnit-Selenium", + "phpunit\/phpunit-story": "php-phpunit-PHPUnit-Story", + "sebastian\/phpcpd": "php-phpunit-phpcpd", + "sebastian\/phpdcd": "php-phpunit-phpdcd", + "ircmaxell/password-compat": "php-password-compat", + "jasig\/phpcas": "php-pear-CAS" +}
\ No newline at end of file diff --git a/checkpkgist.php b/checkpkgist.php index 77c52b2..f1257c7 100755 --- a/checkpkgist.php +++ b/checkpkgist.php @@ -88,13 +88,36 @@ $verb = (in_array('-v', $_SERVER['argv']) || in_array('--verbose', $_SERVER['a $quiet = (in_array('-q', $_SERVER['argv']) || in_array('--quiet', $_SERVER['argv'])); $client = new PkgClient(); -$pkgs = file_get_contents(__DIR__."/checkpkgist.json"); +$pkgs = file_get_contents(__DIR__."/rpmphp.json"); if (!$pkgs) { - die("Missing configuration file\n"); + die("Missing configuration file rpmphp\n"); } $pkgs = json_decode($pkgs, true, 5, JSON_PARSER_NOTSTRICT); if (!$pkgs) { - die("Bad configuration file\n"); + die("Bad configuration file rpmphp\n"); +} +$pkg2 = file_get_contents(__DIR__."/checkpkgist.json"); +if (!$pkg2) { + die("Missing configuration file checkpkgist\n"); +} +$pkg2 = json_decode($pkg2, true, 5, JSON_PARSER_NOTSTRICT); +if (!$pkg2) { + die("Bad configuration file checkpkgist\n"); +} + +$change = false; +foreach ($pkg2 as $pkg => $rpm) { + if (isset($pkgs[$pkg])) { + unset($pkg2[$pkg]); + $change = true; + } else { + $pkgs[$pkg] = $pkg2[$pkg]; + } +} +if ($change) { + if (file_put_contents(__DIR__."/checkpkgist.json", json_encode($pkg2, JSON_PRETTY_PRINT))) { + printf("Configuration file changes saved\n"); + } } if ($sort) { @@ -0,0 +1,2 @@ +#!/bin/sh +wget 'http://rpms.famillecollet.com/rpmphp/get.php?table=packagist' -O rpmphp.json |