Commit b1c75430 authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files

Fix links to AUR packages in optional dependencies

Extend the SQL query that tries to find a package's dependencies so that
optional dependencies with a description are correctly resolved.

Fixes FS#40700.

Signed-off-by: default avatarLukas Fleischer <>
parent 13820d2b
......@@ -170,6 +170,7 @@ function pkg_dependencies($pkgid) {
$dbh = DB::connect();
$q = "SELECT pd.DepName, dt.Name, pd.DepCondition, p.ID FROM PackageDepends pd ";
$q.= "LEFT JOIN Packages p ON pd.DepName = p.Name ";
$q.= "OR SUBSTRING(pd.DepName FROM 1 FOR POSITION(': ' IN pd.DepName) - 1) = p.Name ";
$q.= "LEFT JOIN DependencyTypes dt ON dt.ID = pd.DepTypeID ";
$q.= "WHERE pd.PackageID = ". $pkgid . " ";
$q.= "ORDER BY pd.DepName";
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment