summaryrefslogtreecommitdiff
path: root/packages/pkginfo.php
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-04-14 20:10:02 +0200
committerErich Eckner <git@eckner.net>2018-04-14 20:10:02 +0200
commit7d4bf784bb57fbc330d205ee4621ec6cf6ae9ed6 (patch)
tree76fa75d7bcf15baff66ae2dcdc2c2f515d302295 /packages/pkginfo.php
parent3e98e199a1a9baa6abdfcc8c8efe565475cabcb9 (diff)
downloadarchweb32-7d4bf784bb57fbc330d205ee4621ec6cf6ae9ed6.tar.xz
packages/pkginfo.php: remove duplicate dependencies (only show most unstable one)
Diffstat (limited to 'packages/pkginfo.php')
-rw-r--r--packages/pkginfo.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/pkginfo.php b/packages/pkginfo.php
index 2429975..fe03802 100644
--- a/packages/pkginfo.php
+++ b/packages/pkginfo.php
@@ -106,6 +106,16 @@
" AND `repository_stability_relations`.`less_stable`=" . $mysql_content["repo_stability"] .
") ON `install_target_providers`.`install_target`=`dependencies`.`depending_on`" .
" WHERE `dependencies`.`dependent`=" . $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`" .
+ " JOIN `repository_stability_relations` AS `subst_rsr` ON `subst_rsr`.`less_stable`=`subst_r`.`stability`" .
+ " AND `subst_rsr`.`less_stable`!=`subst_rsr`.`more_stable`" .
+ " JOIN `repository_stability_relations` AS `subst_rsr2` ON `subst_rsr2`.`more_stable`=`subst_r`.`stability`" .
+ " WHERE `subst_bp`.`pkgname`=`binary_packages`.`pkgname`" .
+ " AND `subst_rsr`.`more_stable`=`repositories`.`stability`" .
+ " AND `subst_rsr2`.`less_stable`=`repositories`.`stability`" .
+ ")" .
" GROUP BY `install_targets`.`id`,`dependency_types`.`id`" .
" ORDER BY FIELD (`dependency_types`.`name`,\"run\",\"make\",\"check\",\"link\"), `install_targets`.`name`"
))