Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-03 21:54:50 +0200
committerErich Eckner <git@eckner.net>2018-05-03 21:54:50 +0200
commit8ac70b82acf74e409cfacdfd0c9c59ca0b0bc6e7 (patch)
treead4958e41a9fa72cfb24368cbdc493008836a7a9
parent0eceb8c7bbe0b68311e0bc296fde9b13004f96bb (diff)
packages/: show to-be-deleted flag
-rw-r--r--packages/index.php42
-rw-r--r--packages/pkginfo.php23
2 files changed, 59 insertions, 6 deletions
diff --git a/packages/index.php b/packages/index.php
index c0f4921..53bfb1d 100644
--- a/packages/index.php
+++ b/packages/index.php
@@ -3,7 +3,7 @@
include "lib/mysql.php";
include "lib/style.php";
- foreach (array("bugs","sort") as $expected_param)
+ foreach (array("bugs","sort","del") as $expected_param)
if (! isset($_GET[$expected_param]))
$_GET[$expected_param] = "";
@@ -49,6 +49,11 @@
if ($_GET["bugs"] == "No Bugs")
$filter .= " AND NOT `binary_packages`.`has_issues`";
+ if ($_GET["del"] == "To Be Deleted")
+ $filter .= " AND `binary_packages`.`is_to_be_deleted`";
+ if ($_GET["del"] == "Not To Be Deleted")
+ $filter .= " AND NOT `binary_packages`.`is_to_be_deleted`";
+
if (isset($_GET["q"])) {
$exact_filter = " AND `binary_packages`.`pkgname` = from_base64(\"".base64_encode($_GET["q"])."\")";
$fuzzy_filter = " AND `binary_packages`.`pkgname` LIKE from_base64(\"".base64_encode("%".$_GET["q"]."%")."\")";
@@ -78,7 +83,8 @@
"`binary_packages`.`sub_pkgrel`) AS `version`," .
"IF(`binary_packages`.`has_issues`,1,0) AS `has_issues`," .
"`build_assignments`.`return_date` AS `build_date`," .
- "`binary_packages`.`last_moved` AS `move_date`" .
+ "`binary_packages`.`last_moved` AS `move_date`," .
+ "IF(`binary_packages`.`is_to_be_deleted`,1,0) AS `is_to_be_deleted`" .
$query
);
$exact_matches = array();
@@ -120,6 +126,11 @@
"title" => "last update",
"label" => "Last Updated",
"mysql" => "IFNULL(`binary_packages`.`last_moved`,\"00-00-0000 00:00:00\")"
+ ),
+ "del" => array(
+ "title" => "to be deleted",
+ "label" => "Delete",
+ "mysql" => "`binary_packages`.`is_to_be_deleted`"
)
);
@@ -162,7 +173,8 @@
"`binary_packages`.`sub_pkgrel`) AS `version`," .
"IF(`binary_packages`.`has_issues`,1,0) AS `has_issues`," .
"`build_assignments`.`return_date` AS `build_date`," .
- "`binary_packages`.`last_moved` AS `move_date`" .
+ "`binary_packages`.`last_moved` AS `move_date`," .
+ "IF(`binary_packages`.`is_to_be_deleted`,1,0) AS `is_to_be_deleted`" .
$query .
" LIMIT " . (($page-1)*100) . ", 100"
);
@@ -211,6 +223,14 @@
print "&nbsp;";
print "\n";
print " </td>\n";
+ print " <td>\n";
+ print " ";
+ if ($row["is_to_be_deleted"])
+ print "to be deleted";
+ else
+ print "&nbsp;";
+ print "\n";
+ print " </td>\n";
print " </tr>\n";
if ($oddity == "odd" )
$oddity = "even";
@@ -327,6 +347,22 @@ if (isset($_GET["q"]))
</select>
</div>
<div>
+ <label for="id_del" title="Limit results based on to-be-deleted flag">Delete</label><select id="id_del" name="del">
+<?php
+ $del_drop_down = array("All", "To Be Deleted", "Not To Be Deleted");
+ foreach ($del_drop_down as $label) {
+ print " <option value=\"";
+ if ($label != "All")
+ print $label;
+ print "\"";
+ if ($_GET["del"]==$label)
+ print " selected=\"selected\"";
+ print ">" . $label . "</option>\n";
+ }
+?>
+ </select>
+ </div>
+ <div>
<label>&nbsp;</label>
<input title="Search for packages using this criteria" type="submit" value="Search">
</div>
diff --git a/packages/pkginfo.php b/packages/pkginfo.php
index fb0a992..c7539e5 100644
--- a/packages/pkginfo.php
+++ b/packages/pkginfo.php
@@ -77,7 +77,8 @@
"CONCAT(\"\\\"\",`install_target_providers`.`id`,\"\\\": \",\"{\\n\"," .
"\" \\\"repo\\\": \\\"\",`repositories`.`name`,\"\\\",\\n\"," .
"\" \\\"arch\\\": \\\"\",`architectures`.`name`,\"\\\",\\n\"," .
- "\" \\\"pkgname\\\": \\\"\",`binary_packages`.`pkgname`,\"\\\"\\n\"," .
+ "\" \\\"pkgname\\\": \\\"\",`binary_packages`.`pkgname`,\"\\\",\\n\"," .
+ "\" \\\"is_to_be_deleted\\\": \\\"\",IF(`binary_packages`.`is_to_be_deleted`,\"1\",\"0\"),\"\\\"\\n\"," .
"\"}\"" .
")) AS `deps`," .
"`install_targets`.`name` AS `install_target`" .
@@ -166,7 +167,8 @@
"`repositories`.`name` AS `repo`," .
"`repositories`.`is_on_master_mirror`," .
"`architectures`.`name` AS `arch`," .
- "`binary_packages`.`pkgname`" .
+ "`binary_packages`.`pkgname`," .
+ "IF(`binary_packages`.`is_to_be_deleted`,1,0) AS `is_to_be_deleted`" .
" FROM `install_target_providers`" .
" JOIN `install_targets` ON `install_targets`.`id`=`install_target_providers`.`install_target`" .
" AND `install_targets`.`name` NOT IN (\"base\",\"base-devel\")" .
@@ -211,6 +213,7 @@
$mysql_result = mysql_run_query(
"SELECT " .
"`binary_packages`.`pkgname` AS `pkgname`," .
+ "IF(`binary_packages`.`is_to_be_deleted`,1,0) AS `is_to_be_deleted`," .
"`repositories`.`name` AS `repo`," .
"`repositories`.`is_on_master_mirror`," .
"`architectures`.`name` AS `arch`," .
@@ -333,7 +336,11 @@ if (count($elsewhere)>0) {
print " <a href=\"/" . $subst["repo"] . "/" . $subst["arch"] . "/" . $subst["pkgname"] ."/\"";
print " title=\"Package details for " . $subst["pkgname"] ."\">";
}
+ if ($subst["is_to_be_deleted"])
+ print "<s>";
print $subst["pkgname"] . "-" . $subst["version"] . " [" . $subst["repo"] . "] (" . $subst["arch"] . ")";
+ if ($subst["is_to_be_deleted"])
+ print "</s>";
if ($subst["is_on_master_mirror"])
print "</a>\n";
print " </li>\n";
@@ -462,7 +469,13 @@ if (count($elsewhere)>0) {
print ", ";
$first = false;
print "<a href=\"/".$d_p["repo"]."/".$d_p["arch"]."/".$d_p["pkgname"]."/\" ";
- print "title=\"View package details for ".$d_p["pkgname"]."\">".$d_p["pkgname"]."</a>";
+ print "title=\"View package details for ".$d_p["pkgname"]."\">";
+ if ($d_p["is_to_be_deleted"])
+ print "<s>";
+ print $d_p["pkgname"];
+ if ($d_p["is_to_be_deleted"])
+ print "</s>";
+ print "</a>";
}
if ($virtual_dep)
print ")</span>";
@@ -490,7 +503,11 @@ if (count($elsewhere)>0) {
print "<a href=\"/".$dep["repo"]."/".$dep["arch"]."/".$dep["pkgname"]."/\" ";
print "title=\"View package details for ".$dep["pkgname"]."\">";
}
+ if ($dep["is_to_be_deleted"])
+ print "<s>";
print $dep["pkgname"];
+ if ($dep["is_to_be_deleted"])
+ print "</s>";
if ($dep["repo"] != $content["repo"])
print " [" . $dep["repo"] . "]";
if ($dep["is_on_master_mirror"]=="1")