Commit graph

9 commits

Author SHA1 Message Date
Yorhel
7d31f41ba8 Add FreeBSD 10.3 2016-10-15 22:37:58 +02:00
Yorhel
3f40896679 Add FreeBSD 10.2 2016-10-14 08:09:53 +02:00
Yorhel
c04e6b3b6a Add FreeBSD 10.1 2016-10-12 17:02:37 +02:00
Yorhel
1106b0c08d Add FreeBSD 10.0 2016-10-10 17:19:08 +02:00
Yorhel
659b7afece Implement man selection algorithm in SQL + fix various related bugs
Man selection has to be performed over several thousand rows in some
cases. Loading all those in Perl and then doing the selection isn't very
efficient[1]. The getman() implementation was also buggy: The comparison
function used to determine which man page should be preferred was not
associative[2], and the result thus depended on the order in which the
man pages were compared. This resulted in some wrong selections in some
cases.

While I was at it, I also made the selection more strict:
- /man/unknown-hash would previously ignore the hash and just select
  whatever man page. Now it results in a 404.
- Same with /man.unknown-section
- /man.section/hash is now disallowed, it's either /man.section or
  /man/hash.

1) Note that all possible man pages are currently still loaded into Perl
anyway, because the ugly navigation menu on the right needs them. I plan
to revamp that entire menu to be more efficient and usable.

2) Initially I wrote the SQL implementation in a similar fashion to the
Perl implementation, and ended up with the same bug. I wasted more than
a day before I finally got to the current CTE query.
2016-10-09 09:10:40 +02:00
Yorhel
ed00c5fd46 Add FreeBSD 9.3 2016-10-08 00:18:08 +02:00
Yorhel
d2d48920f4 SQL: Add ON DELETE clause to foreign keys
This makes it easier to remove a complete package or system when
debugging.
2016-10-06 09:52:20 +02:00
Yorhel
7e17853326 Remove HTML-formatted man pages 2016-10-03 20:04:23 +02:00
Yorhel
03d278e4ff Normalize package info tables + change browsing URLs
This splits the 'package' table into 'packages' and 'package_versions',
which should improve performance in some cases and simplify some future
queries.

Previously it wasn't very well defined whether packages were uniquely
identified by (system, name) or by (system, category, name). This is now
normalized to the latter form. This required changes to the package URLs
to include the category.
2016-10-02 20:07:57 +02:00