From 7c91c592458b7532806ef75fe09146f82f085f3b Mon Sep 17 00:00:00 2001
From: Dan McGee
Date: Wed, 30 Mar 2011 20:48:09 -0500
Subject: Remove Dummy Package concept
Instead, we just store dependencies directly in the PackageDepends
table. Since we don't use this info anywhere besides the package details
page, there is little value in precalculating what is in the AUR vs.
what is not.
An upgrade path is provided via several SQL statements in the UPGRADING
document. There should be no user-visible change from this, but the DB
schema gets a bit more sane and we no longer have loads of junk packages
in our tables that are never shown to the end user. This should also
help the MySQL query planner in several cases as we no longer have to be
careful to exclude dummy packages on every query.
Signed-off-by: Dan McGee
Signed-off-by: Lukas Fleischer
---
web/template/pkg_details.php | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
(limited to 'web/template')
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php
index 1a1e611..ef2ba73 100644
--- a/web/template/pkg_details.php
+++ b/web/template/pkg_details.php
@@ -101,24 +101,22 @@ $out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("r", intval($row[
0 || count($requiredby) > 0) {
echo '';
}
if (count($deps) > 0) {
-
echo "". __("Dependencies")."";
while (list($k, $darr) = each($deps)) {
- if ($darr[2] == 0) {
- # $darr[3] is the DepCondition
- echo " ".$darr[1].$darr[3]."";
+ # darr: (DepName, DepCondition, PackageID), where ID is NULL if it didn't exist
+ if (!is_null($darr[2])) {
+ echo " ".$darr[0].$darr[1]."";
} else {
- echo " ".$darr[1].$darr[3]."";
+ echo " ".$darr[0].$darr[1]."";
}
}
@@ -128,17 +126,12 @@ $out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("r", intval($row[
}
if (count($requiredby) > 0) {
-
echo "". __("Required by")."";
while (list($k, $darr) = each($requiredby)) {
- if ($darr[2] == 0) {
- echo " ".$darr[1]."";
- } else {
- print "".$darr[1]."";
- }
+ # darr: (PackageName, PackageID)
+ echo " ".$darr[0]."";
}
-
}
if (count($deps) > 0 || count($requiredby) > 0) {
--
cgit v1.2.3-70-g09d2