[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#696960: [reporting] Should we retire/replace or improve the packages_X.html pages?



On 13076 March 1977, Niels Thykier wrote:

> If we want to stick to entirely static serving, I suspect we could get
> away with a Apache rewrite rule and a symlink farm.  Concrete example
> being something like:

>   RewriteRule ^/source/((lib.).*)\.html$ /by-source/$1/$2.html#$2 [NE,L,R]
>   RewriteRule ^/source/((.).*)\.html$ /by-source/$1/$2.html#$2 [NE,L,R]

> And then have a symlink layout of:

>   by-source/0/0ad.html -> ../../maintainer/<somebody>.html
>   by-source/0/0ad-data.html -> ../../maintainer/<probably-same-as-above>.html
>   ...

> Technically, we could also just dump a html file with a "meta
> http-equiv" redirect for each source package in a directory.  That
> said, I am not too happy with the idea of 18.5k+ files in a single
> directory.

Ugh, what an ugly idea, symlink farm. Even worse with the meta foo. You
have apache, you use the rewrite module, use its powers... :)

The way packages.d.o is doing the rewrites for the changelogs could be
something for you: RewriteMap. Then you have one file defining what goes
where, and apache does a simple lookup in it. Not running around on the fs.

There is 

   RewriteEngine on
   RewriteMap changelog-url txt:/srv/packages.debian.org/files/changelogs-map
   RewriteRule ^/changelog:(.+)$        /changelogs/${changelog-url:$1} [R,L,NE]

and the changelog-map simply consists of lines of

0ad     pool/main/0/0ad/current/changelog
0ad-data        pool/main/0/0ad-data/current/changelog

so that 

http://packages.d.o/changelog:0ad 

translates to 

http://packages.debian.org/changelogs/pool/main/0/0ad/current/changelog

which is then served as usual.

-- 
bye, Joerg
All right pie, I'm just going to do this (munch munch). And if
you get eaten, it's your own fault. (munch munch, bang) Ow! Oww!!
My... Oh, the hell with it!


Reply to: