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 <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Dan McGee 2011-03-30 20:48:09 -05:00 committed by Lukas Fleischer
parent 1f252eba64
commit 7c91c59245
10 changed files with 41 additions and 84 deletions

View file

@ -36,7 +36,7 @@ function updates_table($dbh)
global $apc_prefix, $apc_ttl;
$key = $apc_prefix . 'recent_updates';
if(!(EXTENSION_LOADED_APC && ($newest_packages = apc_fetch($key)))) {
$q = 'SELECT * FROM Packages WHERE DummyPkg != 1 ORDER BY ModifiedTS DESC LIMIT 0 , 10';
$q = 'SELECT * FROM Packages ORDER BY ModifiedTS DESC LIMIT 0 , 10';
$result = db_query($q, $dbh);
$newest_packages = new ArrayObject();
@ -74,7 +74,7 @@ function general_stats_table($dbh)
{
global $apc_prefix;
# AUR statistics
$q = "SELECT count(*) FROM Packages WHERE DummyPkg = 0";
$q = "SELECT count(*) FROM Packages";
$unsupported_count = db_cache_value($q, $dbh, $apc_prefix . 'unsupported_count');
$q = "SELECT count(*) from Users";