Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/packages/pkginfo.php
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-04-14 20:30:49 +0200
committerErich Eckner <git@eckner.net>2018-04-14 20:30:49 +0200
commita6ca7ead5c366bfa02dfa8c21077fe1e84b06957 (patch)
tree9880195851ae72b677bbd981fb131e93d26a141a /packages/pkginfo.php
parentc4c623edfa0fc621c4df197221364ba1d5612263 (diff)
packages/pkginfo.php: remove Required Bys, that would install a different dependency actually
Diffstat (limited to 'packages/pkginfo.php')
-rw-r--r--packages/pkginfo.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/pkginfo.php b/packages/pkginfo.php
index da53b67..a5d9596 100644
--- a/packages/pkginfo.php
+++ b/packages/pkginfo.php
@@ -176,6 +176,18 @@
" JOIN `repository_stability_relations` ON `repository_stability_relations`.`less_stable`=`repositories`.`stability`" .
" AND `repository_stability_relations`.`more_stable`=" . $mysql_content["repo_stability"] .
" WHERE `install_target_providers`.`package`=" . $mysql_content["id"] .
+ " AND NOT EXISTS (" .
+ "SELECT 1 FROM `binary_packages` AS `subst_bp`" .
+ " JOIN `repositories` AS `subst_r` ON `subst_bp`.`repository`=`subst_r`.`id`" .
+ // the substitue must be truly less stable than we
+ " JOIN `repository_stability_relations` AS `subst_rsr` ON `subst_rsr`.`less_stable`=`subst_r`.`stability`" .
+ " AND `subst_rsr`.`less_stable`!=`subst_rsr`.`more_stable`" .
+ // and more (or equally) stable than the required-by
+ " JOIN `repository_stability_relations` AS `subst_rsr2` ON `subst_rsr2`.`more_stable`=`subst_r`.`stability`" .
+ " WHERE `subst_bp`.`pkgname`=from_base64(\"" . base64_encode($mysql_content["pkgname"]) . "\")" .
+ " AND `subst_rsr2`.`less_stable`=`repositories`.`stability`" .
+ " AND `subst_rsr`.`more_stable`=" . $mysql_content["repo_stability"] .
+ ")" .
" GROUP BY `binary_packages`.`id`,`dependency_types`.`id`" .
" ORDER BY FIELD (`dependency_types`.`name`,\"run\",\"make\",\"check\",\"link\"), `install_targets`.`name`!=`binary_packages`.`pkgname`, `install_targets`.`name`, `binary_packages`.`pkgname`"
))