diff options
author | Remi Collet <remi@remirepo.net> | 2017-07-17 20:34:33 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2017-07-17 20:34:33 +0200 |
commit | 26fded585ce5afeb3134d68e723d242b70487141 (patch) | |
tree | ff58fd9a043ef68f3f939f6849b998eb2d5652b7 /php-bartlett-php-compatinfo-db-1.19.0-rpm.patch | |
parent | acd57ba847e0d6f3894da4027a788447d7685818 (diff) |
v1.23.0
Diffstat (limited to 'php-bartlett-php-compatinfo-db-1.19.0-rpm.patch')
-rw-r--r-- | php-bartlett-php-compatinfo-db-1.19.0-rpm.patch | 50 |
1 files changed, 37 insertions, 13 deletions
diff --git a/php-bartlett-php-compatinfo-db-1.19.0-rpm.patch b/php-bartlett-php-compatinfo-db-1.19.0-rpm.patch index 15175ac..4a256a8 100644 --- a/php-bartlett-php-compatinfo-db-1.19.0-rpm.patch +++ b/php-bartlett-php-compatinfo-db-1.19.0-rpm.patch @@ -1,6 +1,6 @@ diff -up ./data/handleDB.php.rpm ./data/handleDB.php ---- ./data/handleDB.php.rpm 2017-03-16 21:26:06.000000000 +0100 -+++ ./data/handleDB.php 2017-03-17 06:32:29.487099296 +0100 +--- ./data/handleDB.php.rpm 2017-07-17 13:41:26.000000000 +0200 ++++ ./data/handleDB.php 2017-07-17 20:24:00.271263969 +0200 @@ -12,7 +12,8 @@ * @since Release 1.0.0alpha1 of PHP_CompatInfo_Db */ @@ -12,22 +12,46 @@ diff -up ./data/handleDB.php.rpm ./data/handleDB.php use Bartlett\CompatInfoDb\ExtensionFactory; diff -up ./src/Bartlett/CompatInfoDb/Environment.php.rpm ./src/Bartlett/CompatInfoDb/Environment.php ---- ./src/Bartlett/CompatInfoDb/Environment.php.rpm 2017-03-17 06:32:29.487099296 +0100 -+++ ./src/Bartlett/CompatInfoDb/Environment.php 2017-03-17 06:41:35.210029823 +0100 -@@ -55,6 +55,10 @@ class Environment - // install DB only if necessary (missing or modified) - copy($source, $dest); - } -+ } else if (($db = getenv('BARTLETT_COMPATINFO_DB')) && file_exists($db)) { +--- ./src/Bartlett/CompatInfoDb/Environment.php.rpm 2017-07-17 20:24:00.271263969 +0200 ++++ ./src/Bartlett/CompatInfoDb/Environment.php 2017-07-17 20:31:52.645050200 +0200 +@@ -39,28 +39,13 @@ class Environment + { + $database = 'compatinfo.sqlite'; + +- if (PATH_SEPARATOR == ';') { +- // windows +- $userHome = getenv('USERPROFILE'); ++ if (($db = getenv('BARTLETT_COMPATINFO_DB')) && file_exists($db)) { + $tempDir = dirname($db); + } else if (file_exists($db = '/usr/share/php-bartlett-php-compatinfo-db/' . $database)) { + $tempDir = dirname($db); } else { - $tempDir = dirname(dirname(dirname(__DIR__))) . '/data'; - } +- // unix +- $userHome = getenv('HOME'); +- } +- $tempDir = $userHome . '/.bartlett'; +- +- if (!file_exists($tempDir)) { +- mkdir($tempDir); +- } +- $source = dirname(dirname(dirname(__DIR__))) . '/data/' . $database; +- $dest = $tempDir . '/' . $database; +- +- if (!file_exists($dest) +- || sha1_file($source) !== sha1_file($dest) +- ) { +- // install DB only if necessary (missing or modified) +- copy($source, $dest); +- } +- ++ $tempDir = dirname(dirname(dirname(__DIR__))) . '/data'; ++ } + $pdo = new PDO('sqlite:' . $tempDir . '/' . $database); + return $pdo; + } diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php ---- ./tests/bootstrap.php.rpm 2017-03-16 21:26:06.000000000 +0100 -+++ ./tests/bootstrap.php 2017-03-17 06:32:29.488099301 +0100 +--- ./tests/bootstrap.php.rpm 2017-07-17 13:41:26.000000000 +0200 ++++ ./tests/bootstrap.php 2017-07-17 20:24:00.272263975 +0200 @@ -1,6 +1,7 @@ <?php |