array( "name" => "arch", "title" => "CPU architecture", "label" => "Arch", "table" => "architectures", "extra_condition" => "", "values" => array() ), "repo" => array( "name" => "repo", "title" => "respository", "label" => "Repository", "table" => "repositories", "extra_condition" => " WHERE `repositories`.`is_on_master_mirror`", "values" => array() ) ); foreach ( $search_criteria as $criterium => $content ) { $result = mysql_run_query( "SELECT `name` FROM `" . $content["table"] . "`" . $content["extra_condition"] . " ORDER BY `name`" ); while ($row = $result -> fetch_assoc()) $search_criteria[$criterium]["values"][] = $row["name"]; } $filter = " WHERE 1"; foreach ($search_criteria as $criterium) if (isset($_GET[$criterium["name"]])) { $filter .= " AND `" . $criterium["table"] . "`.`name` IN ("; foreach ($criterium["values"] as $value) if (strpos("&" . $_SERVER["QUERY_STRING"] . "&", "&" . $criterium["name"] . "=" . $value . "&") !== false) $filter .= "\"" . $value . "\","; $filter .= "\"\")"; } if ($_GET["bugs"] == "Bugs") $filter .= " AND `binary_packages`.`has_issues`"; if ($_GET["bugs"] == "No Bugs") $filter .= " AND NOT `binary_packages`.`has_issues`"; 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"]."%")."\")"; } else { $exact_filter = " AND 0"; $fuzzy_filter = ""; } $query = " FROM `binary_packages`" . " JOIN `architectures` ON `architectures`.`id`=`binary_packages`.`architecture`" . " JOIN `repositories` ON `repositories`.`id`=`binary_packages`.`repository`" . " AND `repositories`.`is_on_master_mirror`" . " JOIN `build_assignments` ON `build_assignments`.`id`=`binary_packages`.`build_assignment`" . $filter . $exact_filter . " ORDER BY "; $query .= "`binary_packages`.`pkgname`,`repositories`.`stability`,`repositories`.`name`,`architectures`.`name`"; $result = mysql_run_query( "SELECT " . "`binary_packages`.`pkgname`," . "`repositories`.`name` AS `repo`," . "`architectures`.`name` AS `arch`," . "CONCAT(IF(`binary_packages`.`epoch`=\"0\",\"\",CONCAT(`binary_packages`.`epoch`,\":\"))," . "`binary_packages`.`pkgver`,\"-\"," . "`binary_packages`.`pkgrel`,\".\"," . "`binary_packages`.`sub_pkgrel`) AS `version`," . "IF(`binary_packages`.`has_issues`,1,0) AS `has_issues`," . "`build_assignments`.`return_date` AS `build_date`" . $query ); $exact_matches = array(); while ($row = $result -> fetch_assoc()) $exact_matches[] = $row; $sorts = array( "arch" => array( "title" => "architecture", "label" => "Arch", "mysql" => "`architectures`.`name`" ), "repo" => array( "title" => "repository", "label" => "Repo", "mysql" => "`repositories`.`name`" ), "pkgname" => array( "title" => "package name", "label" => "Name", "mysql" => "`binary_packages`.`pkgname`" ), "pkgver" => array( "title" => "package version", "label" => "Version", "mysql" => "CONCAT(`binary_packages`.`epoch`,\":\",`binary_packages`.`pkgver`,\"-\",`binary_packages`.`pkgrel`,\".\",`binary_packages`.`sub_pkgrel`)" ), "bugs" => array( "title" => "bug status", "label" => "Bugs", "mysql" => "NOT `binary_packages`.`has_issues`" ), "build_date" => array( "title" => "build date", "label" => "Build Date", "mysql" => "IFNULL(`build_assignments`.`return_date`,\"00-00-0000 00:00:00\")" ) ); $query = " FROM `binary_packages`" . " JOIN `architectures` ON `architectures`.`id`=`binary_packages`.`architecture`" . " JOIN `repositories` ON `repositories`.`id`=`binary_packages`.`repository`" . " AND `repositories`.`is_on_master_mirror`" . " JOIN `build_assignments` ON `build_assignments`.`id`=`binary_packages`.`build_assignment`" . $filter . $fuzzy_filter . " ORDER BY "; if (isset($_GET["sort"])) { if (isset($sorts[$_GET["sort"]]["mysql"])) $query .= $sorts[$_GET["sort"]]["mysql"] . ","; elseif (isset($sorts[substr($_GET["sort"],1)]["mysql"])) $query .= $sorts[substr($_GET["sort"],1)]["mysql"] . " DESC,"; } $query .= "`binary_packages`.`pkgname`,`repositories`.`stability`,`repositories`.`name`,`architectures`.`name`"; $result = mysql_run_query( "SELECT COUNT(1)" . $query ); $num_results = implode($result -> fetch_assoc()); $pages = max(ceil($num_results / 100), 1); if (isset($_GET["page"])) $page = max(min($_GET["page"]+0, $pages),1); else $page = 1; $result = mysql_run_query( "SELECT " . "`binary_packages`.`pkgname`," . "`repositories`.`name` AS `repo`," . "`architectures`.`name` AS `arch`," . "CONCAT(IF(`binary_packages`.`epoch`=\"0\",\"\",CONCAT(`binary_packages`.`epoch`,\":\"))," . "`binary_packages`.`pkgver`,\"-\"," . "`binary_packages`.`pkgrel`,\".\"," . "`binary_packages`.`sub_pkgrel`) AS `version`," . "IF(`binary_packages`.`has_issues`,1,0) AS `has_issues`," . "`build_assignments`.`return_date` AS `build_date`" . $query . " LIMIT " . (($page-1)*100) . ", 100" ); $fuzzy_matches = array(); while ($row = $result -> fetch_assoc()) $fuzzy_matches[] = $row; function print_results($results) { $oddity="odd"; foreach ($results as $row) { print "
\n"; print " " . $num_results . " matching package"; if ($num_results != 1) print "s"; print " found.\n"; if ($pages != 1) print " Page " . $page . " of " . $pages . ".\n"; print "
\n"; if ($pages != 1) { print "exact match found.
Arch | Repo | Name | Version | Bugs |
---|
\n"; print " ".$sort["label"]."\n"; print " | \n"; } ?>
---|
Can't find what you are looking for? Try searching again using different criteria, or try searching the AUR to see if the package can be found there.
You are browsing the Arch Linux 32 package database. From here you can find detailed information about packages located in the 32 bit repositories.