Problems in "Get Counted" page

Dan Nicholson dbn.lists at gmail.com
Mon Oct 9 10:50:57 PDT 2006


On 10/9/06, Gerard Beekmans <gerard at linuxfromscratch.org> wrote:

> Does this problem still exist? I wrote this perl program so I can fix it
> as well. It's an ancient piece of code that really is a mess. I'm
> surprised it's still been able to serve our needs all these years
> (albeit with headaches it sounds like).

I don't believe anything's changed since I wrote that mail, so I'm
sure it still exists. Now I'm looking again and remembering what's
going on. I'm not fluent in perl speak, so I'll do my best to decipher
what it's doing.

cgi-bin/lfscounter.cgi "sources" cgi-bin/template/lfscounter.tmpl.
This file contains the mappings between the html and the values passed
to the script, I think. There's a section in lfscounter.tmpl <select
name="reg_first_lfs"> and at the bottom contains these values:

<option value="cvs">SVN</option>
<option value="cvs">hlfs-svn</option>
<option value="cvs">clfs-svn</option>

So, if you want to make clfs-svn your first LFS, it just gets lumps it
into the cvs value. In lfscounter.cgi, there's a regex that contains
hlfs-svn and clfs-svn, but these values will never be given to the
script. This is probably because more processing would be needed in
the script to handle them in addition to the cvs value.

Now, what would be nice is if all these scripts lived in the www2
repository instead of just on disk with a horde of backups. There's
already a scripts and templates sub-repo where these could go.

Two problems here. First, you'd probably need to change the httpd
configuration so that the scripts directory would be the cgi-bin for
www.lfs.org. Or, you could put cgi-bin under version control, too. I'm
no apache expert.

Second, although these scripts and templates sub-repos exist, nothing
actually happens with them using the update-website* scripts that get
run from lizardo's home directory. The update hook is a little goofy,
but it could probably be altered to make this work with little pain.

--
Dan



More information about the website mailing list