708b1364be58c9b921cc3838d7ed5f5b48959d78 fixed the handling
of ~ but broke the handling of comparing a "normal" letter
with the empty string. A letter sorts earlier than all
non-letter except ~, but of course not earlier as the empty string.
100syncarchive: Really fix retrieval of Release(.gpg) files
7f261c49b0b932c5cf04b107bac3bc8aad5f642c attempted to fix the
retrieval of the Release(.gpg) files from a local mirror but
really didn't because it didn't accounted for the chdir before
the rsync call. Really fix it this time y removing the chdir.
Packages::DoIndex: Ugly hack to fix content negotiation
Since we don't create the static pages for ddtplangs currently,
only for polangs, but we don't discriminate between the two in
the content negotiation we might try to serve a non-existant file.
Fixing the content negoation or the static file generation will
take some time and testing. For now, work around the bug by stat'ing
the requested file in DoIndex and falling back to English in case it doesn't
exist.
Update list of ddtp languages to the ones available on
ddtp.debian.net.
Fix typo in 120synctrans in the remote mirror retrieval
part.
Execute parse-translations before parse-contents in process_archive
because the latter needs way more time.
cron.d/120synctrans: Allow overriding the server for downloading translations
Suggested by Helge Kreutzmann <debian -at- helgefjell de>
Since the translations in the main Debian archive are still way outdated, use
ddtp.debian.net for now. Make overriding $ddtp_ftpsite optional and fall back
to $ftpsite automatically if no seperate $ddtp_ftpsite is defined.
apache.conf: Let apache send static files directly if possible
If we have no QUERY_STRING and a static file is requested, let
apache handle this directly. This also reenables the behaviour
that packages.debian.org/etch goes to packages.debian.org/etch/
instead of searching for etch.
In etch dpkg-source can extract source packages to a designated
directory. Use this instead of trying to extract the directory name
from dpkg-source's output which is inheriently unreliable.
Don't waste time on calling read_entry_simple for removed
packages. Also fix error detection for this call. The result
is always defined (and an array reference), errors can be
detected by checking whether the referenced array is empty.
Packages::DoDownload: Don't try to numerically compare a localized number
After formatting a number with the help of sprintf, it is localized, i.e.
the decimal point might not be a decimal point anymore. So don't try to
compare it numerically (i.e. with '<' or '>') since that will not work.
"Use of uninitialized value" mostly and two
occourence of masking an earlier defined variable.
No bugs really, but they clutter up the web servers log.
Merge from CVS: Skip clean-up if extraction fails and some minor changes
revision 1.3
date: 2007-07-26 15:32:23 +0200; author: djpig; state: Exp; lines: +13 -5
Skip clean-up run if extraction failed so that we don't lose all
the changelogs next time some bugs goes unnoticed for a week
----------------------------
revision 1.2
date: 2007-07-23 18:47:49 +0200; author: djpig; state: Exp; lines: +2 -2
Commit some older local changes:
* double time until deletion, no reason here to be too strict
* enable debug output, makes the logs much more informative in case of problems
Merge from CVS: Fix handling of version 0 and some Perl warnings
revision 1.17
date: 2007-07-26 11:58:34 +0200; author: djpig; state: Exp; lines: +9 -1
Initialize %stats hash to avoid perl warnings
----------------------------
revision 1.16
date: 2007-07-23 17:59:14 +0200; author: djpig; state: Exp; lines: +1 -1
The version number can be just 0, don't fall over that
For a given <package>, search for P<package>,
and then extract all the terms from the document
you find (you could also implement this part by
just looking up the description and applying the
same algorithms to it as in parse-packages, haven't
benchmarked that against each other).
With these terms then make a OR search. Ignore all
results <package>, since these are obvious ;)
The first few matches of the rest are usually
packages very similar to the one we started with.
Packages::Dispatcher: create from code from dispatcher.pl
This is currently only a copy with some small formatting changes.
But this should benefit our mod_perl cleaness and I intend to
wrap that up somewhat nicer in the future, too.
Remove Packages::Template->trailer which essentially forced
any format to have a foot.tmpl even it made no sense for them.
Now formats that want something like that can handle it themself.
Fix handling of languages in the footer so that we get a list
of available translations again. Currently this only reflects
DDTP translations since the po stuff isn't reenabled yet since
the switch to templates.
Fulltext search: Greatly improve by using a more fuzzy approach
Most of this done on suggestion of Enrico Zini <enrico@enricozini.org>
Using OP_OR instead of OP_AND as default can actually lead to better
matches because the ones found with OP_AND often don't actually are
the most relevant ones. This is especially true when using more than
two keywords.
Accordingly sort by relevance on the result page.
Improve indexing:
+ Add both the unstemmed and the stemmed description to index
this will increase the relevance of exact matches. Only the
latter is done with positional information
+ Really index debtags and the package name
This only adds support for displaying the description
itself on the show page, not the short description in
dependencies or in search results.
The latter is more complicated now since we store the
short description in packages_small exactly because these
places are performance critical and to have to
access one more database in these places is bad...
cron.d/120syntrans: retrieve DDTP descriptions again
They are now on the official mirrors and there seems to be a real chance
that the project gets revived again. So start supporting translated
descriptions again.
templates/html/show.tmpl: Fix bug in generation of "Files" column in download table
b688b16487ef2ca8ad7861d7c20da16a9f3f4448 changed the loop to use a local
variable instead of implicit declaration but didn't change the
use of the contents_avail hash key. This broke the "Files" column
to never display a file link.
templates/html/show.tmpl: Make "Version" column of download table more readable
Previously it was sometimes difficult to spot differences in the versions,
especially if the are only in the Debian revision. Color code the
background so that one can spot differences easier. All up-to-date
versions are indicated with a green background. If the version differs
from the latest version only in the Debian revision, use yellow.
If they differ in the upstream revision, use red.
Inspired by discussion with Neil Williams <codehelp debian org>
templates/html/search.tmpl: Add suite as class for search results
And use this to display "unofficial" suites a bit smaller than the
others. Move the CSS information to a new css file packages-site.css
since this information will probably very site specific.
templates/html/show.tmpl: Add experimental tabbing for content
Since the content tends to get very long and confusing, let the
user switch between "Description" (which includes the list of
binaries for source packages and the list of tags), "Dependencies",
and "Download".
Some binary packages are build from official Debian
sources but have no version in the Debian archive
(e.g. libc0.1). Fix searching the source package for
those. Rather hackish solution, needs cleanup.
Get this information by 1) exposing the archive in the
%downloads hash 2) using config/mirrors.tmpl to determine
whether this archive is an unofficial port
extract_changelogs: Merge cron job changes from old site
Merge the new daily cron job scripts from old site that
splits the extract_changelogs from the rest of the
cron job. This avoids delaying the rest of the cronjob for
the changelog extraction. Using two different lock files
also makes the whole site update more robust.
packages.d.o is for end users who are probably not interested in
the various special: tags that are more useful for debtags maintainance.
(This can be moved to the template if ever the need arises to display these
tags)
Use Xapian as Backend for fulltext search in descriptions.
Introduces new do_xapian_search function to be able to switch
to the old do_fulltext_search in case of problems.
static: Add a simple index page and use ttree to build and install
Add a simple index page to static that we can use as homepage if we don't
want to redirect to an external search form like we do on the official
packages.debian.org.
Also use ttree to build and install the contents of static. This allows
to use TT for preprocessing. The first example of such a file is the
added index file.