diff options
author | Erich Eckner <git@eckner.net> | 2018-04-14 12:25:29 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-04-14 12:25:29 +0200 |
commit | 28d93bb66fa28fbce195e36bf50763efb370a63b (patch) | |
tree | 9dce225429290bcea340ba0855ad4338e053cd4a /packages/pkginfo.php | |
parent | 99485e324ffc9723e945ff67cac10aadb4716ad7 (diff) | |
download | archweb32-28d93bb66fa28fbce195e36bf50763efb370a63b.tar.xz |
packages/pkginfo.php: ignore .0 sub_pkgrel if necessary
Diffstat (limited to 'packages/pkginfo.php')
-rw-r--r-- | packages/pkginfo.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/pkginfo.php b/packages/pkginfo.php index b8d280f..ccc3522 100644 --- a/packages/pkginfo.php +++ b/packages/pkginfo.php @@ -60,13 +60,15 @@ $same_keys = array ( array("mysql" => "pkgname", "json" => "Name"), - array("mysql" => "version", "json" => "Version"), + array("mysql" => "version", "json" => "Version", "suffix_diff" => ".0"), array("mysql" => "repo", "json" => "Repository"), array("mysql" => "arch", "json" => "Architecture") ); foreach ($same_keys as $same_key) - if ($mysql_content[$same_key["mysql"]] != $json_content[$same_key["json"]]) + if (($mysql_content[$same_key["mysql"]] != $json_content[$same_key["json"]]) && + ((!isset($same_key["suffix_diff"])) || + ($mysql_content[$same_key["mysql"]] != $json_content[$same_key["json"]].$same_key["suffix_diff"]))) die_500("Inconsistency in Database found:<br>\n" . "buildmaster[" . $same_key["mysql"] . "] != repositories[" . $same_key["json"] . "]:<br>\n" . "\"" . $mysql_content[$same_key["mysql"]] . "\" != \"" . $json_content[$same_key["json"]] . "\""); |