From 26fded585ce5afeb3134d68e723d242b70487141 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 17 Jul 2017 20:34:33 +0200 Subject: v1.23.0 --- php-bartlett-php-compatinfo-db-1.19.0-rpm.patch | 50 ++++++++++++++++++------- php-bartlett-php-compatinfo-db.spec | 7 +++- 2 files changed, 42 insertions(+), 15 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 @@ - 1.23.0-1 +- Update to 1.23.0 + * Sat Jun 10 2017 Remi Collet - 1.22.0-1 - Update to 1.22.0 -- cgit