[Dehs-devel] Re: comments on debian watch files

Bluefuture bluefuture at email.it
Thu Mar 16 13:27:28 UTC 2006


Il giorno gio, 16/03/2006 alle 00.34 -0500, Eric Dorland ha scritto:
> * Lars Wirzenius (liw at iki.fi) wrote:
> > ke, 2006-03-15 kello 13:10 +0100, Fathi Boudra kirjoitti:
> > > just to point you a way to use watch file and an already existing project on 
> > > alioth: http://dehs.alioth.debian.org/
> > 
> > You should adveritse loudly that it lets people upload watch files. It
> > is not at all clear from the web page. But if it works, good. Now I can
> > start pointing people at it when they complain about missing watch
> > files.
> 
> Actually is there a way to upload a watch file in dehs? There doesn't
> appear to be one, but again I think it's a good idea. 
> 

> Stefano: How about it? Can we start adding watch files to the dehs svn
> repo that the site can use in addition to the ones in packages? 
> 

As you can see from the dehs svn repos the dehs system date framework is
based on a postgres db. This is the create section of the function
check_db so you could overview the filed and index used. I know that the
ER structure could be hardly improved and speeder :)
-------------------------------------------------------------------------
 pg_exec($db, "CREATE TABLE pkgs (id serial PRIMARY KEY,name
text,version text,maint text, uploaders text, dir text,watch
text,md5_diff text,md5_atsource text,bytes numeric,dist text,section
text,up_version text,up_changes text, up_url text,watch_warn
text,updated bool, keep_changes bool, wwiz text,wwiz_version text,
wwiz_type text)") or die('Error creating table pkgs\n');
   pg_exec($db, "CREATE UNIQUE INDEX idxname on pkgs (name,dist)") or
die('Errore creating index - ' . pg_last_error($db));
   $sw=true;
  } 
if (!pg_table_exists($db,"binpkgs")){
   pg_exec($db, "CREATE TABLE binpkgs (id serial PRIMARY KEY, name
text,bin_name text,dist text, pop_inst numeric,pop_vote numeric,
up_error numeric,avg_error_date numeric)") or die('Error creating table
binpkgs\n');
   pg_exec($db, "CREATE UNIQUE INDEX idxbin on binpkgs
(name,bin_name,dist)") or die('Errore creating index - ' .
pg_last_error($db));
   $sw=true; 
---------------------------------------------------------------------------

Actually, for packages that doesn't have watch file dehs try to generate
automatically starting from the debian package copyright file (the
watch_fill function). There is also another function that try to
generate watch file from freshmeat (the watch_fillfre function) and it
is actually implemented but not used. The packages without watch file
actually are selected by this query:

---------------------------------------------------------------------------
"SELECT mpop_inst,name,pkgs.version,pkgs.section,pkgs.dist,tot_up_error,
tot_avg_error_date, wwiz_version FROM pkgs INNER JOIN
    (Select max(pop_inst) as mpop_inst,SUM(up_error) as
tot_up_error,AVG(avg_error_date) as tot_avg_error_date,name,dist FROM
binpkgs GROUP BY name,dist HAVING max(pop_inst) IS NOT NULL) as binpkgs
using(name,dist) 
    WHERE (watch IS NULL OR watch='') AND name LIKE '$src_name%' ORDER
BY mpop_inst DESC"
---------------------------------------------------------------------------

Actually with watch_fill function we have: 

Watch (956)->Dehs wizard generated Watch file. It has passed Uscan test
Errors (4072)-> Error for the dehs wizard Watch file that has not passed
Uscan test. N/A (6)-> Copyright files not found. 
Notmatch (1132)-> Copyright file, no http/ftp address found from Watch
wizard.

Probably this 956 and 4072 errors watch file could be manually reviewed
or used as a base to fill a right watch file. There will still 1132
copyright file when watch_fill function has no find a valid http/ftp
upstream address (this function is a dirty hack so it could be highly
improved).

So there is always the wwiz and wwiz type (that is the status) that we
could use.

I'm open to any solution to dynamically fix watch file but i doesn't
know what is the better solution. 
I remember to you that dehs actually try to extract and store in the db
upstream NEWS/Changelog from the new upstream file. It could be helpfull
if in the watch file could be specified the name of news/chages file to
follow.


I'm waiting for your idea and i hope, after two years that we could find
a good and stable solution to this issue :)

Regards,

Stefano






More information about the Dehs-devel mailing list