Arch: Mark deleted packages as dead and hide them from listings
We've got a lot of packages in the DB that have long been removed from the Arch repos. These are still indexed, but won't clutter the package listing anymore. Also fixed an issue with packages.id numbers getting rather large because the indexer allocates a new ID for every package on every update.
This commit is contained in:
parent
f3323de5e4
commit
b27d55215a
5 changed files with 50 additions and 7 deletions
|
|
@ -781,10 +781,10 @@ TUWF::get qr{/pkg/([^/]+)} => sub {
|
|||
p => { onerror => 1, uint => 1, range => [1,200] },
|
||||
)->data;
|
||||
|
||||
my $where = sql 'system =', \$sys->{id}, $f->{c} ne 'all' ? ('AND match_firstchar(name,', \$f->{c}, ')') : ();
|
||||
my $where = sql 'NOT dead AND system =', \$sys->{id}, $f->{c} ne 'all' ? ('AND match_firstchar(name,', \$f->{c}, ')') : ();
|
||||
my $count = tuwf->dbVali('SELECT count(*) FROM', $packages_with_man, 'p WHERE', $where);
|
||||
my $pkg = tuwf->dbPagei({ results => 200, page => $f->{p} },
|
||||
'SELECT id, system, name, category FROM', $packages_with_man, 'p WHERE', $where, 'ORDER BY name, category'
|
||||
'SELECT id, system, name, category, dead FROM', $packages_with_man, 'p WHERE', $where, 'ORDER BY name, category'
|
||||
);
|
||||
|
||||
my $title = $sys->{name}.($sys->{release}?" $sys->{release}":"");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue