summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-04-21 17:53:20 +0200
committerRemi Collet <fedora@famillecollet.com>2016-04-21 17:53:20 +0200
commit989d0a516c2af2fbe6952796015770b708905f7d (patch)
tree082359394b80d90ac8869f815cc0eea06a1ab493
parent0c7997c133fb7e57f78ffa255c7267968d52d46d (diff)
checkpkgist: use rpmname (unique) as index as pkgname is not unique
-rw-r--r--checkpkgist.json88
-rwxr-xr-xcheckpkgist.php19
-rwxr-xr-xget4
3 files changed, 55 insertions, 56 deletions
diff --git a/checkpkgist.json b/checkpkgist.json
index e7b1edf..cee862a 100644
--- a/checkpkgist.json
+++ b/checkpkgist.json
@@ -1,46 +1,46 @@
{
- "zendframework\/zendframework1": "php-ZendFramework",
- "phpunit\/phpunit-story": "php-phpunit-PHPUnit-Story",
- "sebastian\/phpdcd": "php-phpunit-phpdcd",
- "tecnickcom\/tc-lib-pdf-parser": "php-tecnickcom-tc-lib-pdf-parser",
- "tecnickcom\/tc-lib-file": "php-tecnickcom-tc-lib-file",
- "tecnickcom\/tc-lib-pdf-encrypt": "php-tecnickcom-tc-lib-pdf-encrypt",
- "tecnickcom\/tc-lib-pdf-filter": "php-tecnickcom-tc-lib-pdf-filter",
- "tecnickcom\/tc-lib-pdf-graph": "php-tecnickcom-tc-lib-pdf-graph",
- "tecnickcom\/tc-lib-pdf-page": "php-tecnickcom-tc-lib-pdf-page",
- "tecnickcom\/tc-lib-unicode": "php-tecnickcom-tc-lib-unicode",
- "tecnickcom\/tc-lib-unicode-data": "php-tecnickcom-tc-lib-unicode-data",
- "mongodb\/mongodb": "php-mongodb",
- "tedivm\/jshrink": "php-tedivm-jshrink",
- "phine\/path": "php-phine-path",
- "phine\/exception": "php-phine-exception",
- "hoa\/event": "php-hoa-event",
- "hoa\/exception": "php-hoa-exception",
- "hoa\/cli": "php-hoa-cli",
- "hoa\/compiler": "php-hoa-compiler",
- "hoa\/consistency": "php-hoa-consistency",
- "hoa\/console": "php-hoa-console",
- "hoa\/devtools": "php-hoa-devtools",
- "hoa\/dispatcher": "php-hoa-dispatcher",
- "hoa\/iterator": "php-hoa-iterator",
- "hoa\/json": "php-hoa-json",
- "hoa\/file": "php-hoa-file",
- "hoa\/locale": "php-hoa-locale",
- "hoa\/math": "php-hoa-math",
- "hoa\/praspel": "php-hoa-praspel",
- "hoa\/protocol": "php-hoa-protocol",
- "hoa\/realdom": "php-hoa-realdom",
- "hoa\/regex": "php-hoa-regex",
- "hoa\/router": "php-hoa-router",
- "hoa\/stream": "php-hoa-stream",
- "hoa\/stringbuffer": "php-hoa-stringbuffer",
- "hoa\/http": "php-hoa-http",
- "hoa\/test": "php-hoa-test",
- "hoa\/ustring": "php-hoa-ustring",
- "hoa\/view": "php-hoa-view",
- "hoa\/visitor": "php-hoa-visitor",
- "hoa\/xml": "php-hoa-xml",
- "hoa\/xyl": "php-hoa-xyl",
- "hoa\/zformat": "php-hoa-zformat",
- "theseer\/fxsl": "php-theseer-fxsl"
+ "php-ZendFramework": "zendframework\/zendframework1",
+ "php-phpunit-PHPUnit-Story": "phpunit\/phpunit-story",
+ "php-phpunit-phpdcd": "sebastian\/phpdcd",
+ "php-tecnickcom-tc-lib-pdf-parser": "tecnickcom\/tc-lib-pdf-parser",
+ "php-tecnickcom-tc-lib-file": "tecnickcom\/tc-lib-file",
+ "php-tecnickcom-tc-lib-pdf-encrypt": "tecnickcom\/tc-lib-pdf-encrypt",
+ "php-tecnickcom-tc-lib-pdf-filter": "tecnickcom\/tc-lib-pdf-filter",
+ "php-tecnickcom-tc-lib-pdf-graph": "tecnickcom\/tc-lib-pdf-graph",
+ "php-tecnickcom-tc-lib-pdf-page": "tecnickcom\/tc-lib-pdf-page",
+ "php-tecnickcom-tc-lib-unicode": "tecnickcom\/tc-lib-unicode",
+ "php-tecnickcom-tc-lib-unicode-data": "tecnickcom\/tc-lib-unicode-data",
+ "php-mongodb": "mongodb\/mongodb",
+ "php-tedivm-jshrink": "tedivm\/jshrink",
+ "php-phine-path": "phine\/path",
+ "php-phine-exception": "phine\/exception",
+ "php-hoa-event": "hoa\/event",
+ "php-hoa-exception": "hoa\/exception",
+ "php-hoa-cli": "hoa\/cli",
+ "php-hoa-compiler": "hoa\/compiler",
+ "php-hoa-consistency": "hoa\/consistency",
+ "php-hoa-console": "hoa\/console",
+ "php-hoa-devtools": "hoa\/devtools",
+ "php-hoa-dispatcher": "hoa\/dispatcher",
+ "php-hoa-iterator": "hoa\/iterator",
+ "php-hoa-json": "hoa\/json",
+ "php-hoa-file": "hoa\/file",
+ "php-hoa-locale": "hoa\/locale",
+ "php-hoa-math": "hoa\/math",
+ "php-hoa-praspel": "hoa\/praspel",
+ "php-hoa-protocol": "hoa\/protocol",
+ "php-hoa-realdom": "hoa\/realdom",
+ "php-hoa-regex": "hoa\/regex",
+ "php-hoa-router": "hoa\/router",
+ "php-hoa-stream": "hoa\/stream",
+ "php-hoa-stringbuffer": "hoa\/stringbuffer",
+ "php-hoa-http": "hoa\/http",
+ "php-hoa-test": "hoa\/test",
+ "php-hoa-ustring": "hoa\/ustring",
+ "php-hoa-view": "hoa\/view",
+ "php-hoa-visitor": "hoa\/visitor",
+ "php-hoa-xml": "hoa\/xml",
+ "php-hoa-xyl": "hoa\/xyl",
+ "php-hoa-zformat": "hoa\/zformat",
+ "php-theseer-fxsl": "theseer\/fxsl"
} \ No newline at end of file
diff --git a/checkpkgist.php b/checkpkgist.php
index 969cea0..dabfcb4 100755
--- a/checkpkgist.php
+++ b/checkpkgist.php
@@ -187,12 +187,12 @@ if (!$pkg2) {
}
$change = false;
-foreach ($pkg2 as $pkg => $rpm) {
- if (isset($pkgs[$pkg])) {
- unset($pkg2[$pkg]);
+foreach ($pkg2 as $rpm => $pkg) {
+ if (isset($pkgs[$rpm])) {
+ unset($pkg2[$rpm]);
$change = true;
} else {
- $pkgs[$pkg] = $pkg2[$pkg];
+ $pkgs[$rpm] = $pkg2[$rpm];
}
}
if ($change) {
@@ -208,19 +208,18 @@ printf(" %-40s %15s %15s %15s\n", "Name", "Version", "Upstream", "Date");
$tmp = array();
for ($i=1 ; $i<$_SERVER['argc'] ; $i++) {
- if (is_dir($_SERVER['argv'][$i])) {
- $_SERVER['argv'][$i] = basename(realpath($_SERVER['argv'][$i]));
+ if (is_dir($rpm = $_SERVER['argv'][$i])) {
+ $rpm = basename(realpath($_SERVER['argv'][$i]));
}
- $k = array_search($_SERVER['argv'][$i], $pkgs);
- if ($k) {
- $tmp[$k] = $pkgs[$k];
+ if (isset($pkgs[$rpm])) {
+ $tmp[$rpm] = $pkgs[$rpm];
}
}
if (count($tmp)) {
$verb = true;
$pkgs = $tmp;
}
-foreach ($pkgs as $name => $rpm) {
+foreach ($pkgs as $rpm => $name) {
run($name, $rpm);
}
echo str_repeat(' ', 50)."\n";
diff --git a/get b/get
index 8c3eab5..c2ed34a 100755
--- a/get
+++ b/get
@@ -1,10 +1,10 @@
#!/bin/sh
mv rpmphp.json.prev /tmp
-if wget 'http://rpms.famillecollet.com/rpmphp/get.php?table=packagist' -O rpmphp.json.new
+if wget 'http://rpms.famillecollet.com/rpmphp/get.php?table=packagist2' -O rpmphp.json.new
then
mv rpmphp.json rpmphp.json.prev && \
mv rpmphp.json.new rpmphp.json && \
echo done
colordiff rpmphp.json.prev rpmphp.json
-fi \ No newline at end of file
+fi