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

Re: [GSoC] blends-gen-control hints (Was: blends-dev, gsoc 2013)

Hi Emmanouil,

On Mon, Jul 29, 2013 at 04:38:53PM +0300, Emmanouil Kiagias wrote:
> I looked again at the udd/setup.sql I realised that we forgot to add
> primary key pair for the blends_dependencies_alternatives. The primary key
> definition also includes the unique pair constraint which is what we need
> at this case. so instead of having something like UNIQUE(blend, task,
> alternatives) we just add the primary key pair(as you have done in
> blends_dependencies).

That's true and I applied the patch (which I stripped from the mail).

> That way there won't be duplicated packages as it happens in your local UDD
> copy.

The patch needed some additions to the importer (sure, if we prevent
something by a constraint we need to make sure the data breaking the
constraint will not be included).  So while we now have a clean database
I'm a bit concerned about the way how we avoid the duplicates.  Strictly
speaking it is the fault of the metapackage designer but IMHO we should
try to be error tolerant.  What might happen is that we get some sequence
inside the tasks file say

Ignore: foo

Depends: foo

Suggests: bar

Depends: bar

In the database we would get

udd=# SELECT package, dependency FROM blends_dependencies WHERE package in ('foo', 'bar') ;
 package | dependency 
 foo     | i
 bar     | s

even if both should get a dependency 'd'.  Currently I issue error lines into
the logfile.  Just check

   grep -iw error blends_metadata_gatherer.log

However, it seems to be clear that this logfile is rarely visited and so
I wonder what to do.  Should we check for the strongest possible
dependency?  Should we just accept what comes first (as we do now).
Currently those cases are only in debian-edu and I will talk to the
debian-edu people at DebConf anyway, but I wanted to mention this
problem here.

Perhaps we include an example of the problem below into Debian Fun task
to make sure we will not forget.

Once I was using the database including constraint the resulting taskdesc
files were OK.

Kind regards



Reply to: