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

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



Hello Andreas,

I just committed the new version of {sec-}blend-gen-control which now uses the {contain-}provides column. I run again the tester and a surprising, I have to say, bug(?) in sec-blend-gen-control came out( I will explain it below ). The control/task-description files for almost all blends seem to be ok(also the differences we had with debian-imaging with "djvu-viewer" virtual package are now solved), only debian-edu control files still have differences with packages which are not found in any of the tables(packages, new_packages, ubuntu_packages, blends_prospectivepackages) that the blends_metadata_gathener.py checks. For example:

diff control/control.amd64 control-sec/control.amd64
130c130
<  dpt-i2o-raidutils | raidutils,
---
>  dpt-i2o-raidutils | raidutils | dpt-raidutil,
138c138
<  foomatic-filters-ppds,
---
>  foomatic-filters-ppds | cupsomatic-ppd,
440a441
>  flashplugin-nonfree-pulse | libflashsupport,
524c525
<  kig,
---
>  kig | keuklid | kgeo,
553d553
<  libflashsupport,
603a604
>  sodipodi,
706c707
<  gpsim-led,
---
>  gpsim-led | gpsim-lded,
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Except from debian-edu other Blends seem to be ok(and virtual packages are handled properly, except from the case which I explain below).


Now about the interesting bug. For debian-edu:
For the packages:  nfs-kernel-server | nfs-server , we have:

1)In blends_dependencies_alternatives for debian-edu we have:

   blend    |    task     |          alternatives          | contains_provides | dependency 
------------+-------------+--------------------------------+-------------------+------------
 debian-edu | main-server | nfs-kernel-server | nfs-server | t                 | d

2)and in blends_dependencies we have:

   blend    |    task     |      package      | provides | dependency 
------------+-------------+-------------------+----------+------------
 debian-edu | main-server | nfs-kernel-server | f        | d
 debian-edu | main-server | nfs-server        | t        | d

Let's take the control file for architecture kfreebsd-amd64
For kfreebsd-amd64, testing release virtual package "nfs-server" is available but "nfs-kernel-server" package is not. So blend-gen-control correctly places "nfs-server" in Depends: and "nfs-kernel-server" in Suggests:.
In the blends_dependencies table where each package is single I know exactly which packages are virtual or not. So for this example I will check if nfs-kernel-server exists by outer joining the blends_dependencies table(like I do for all the packages) but for the virtual nfs-server(provides=true so I handle this packages in different way than the other  ) I will do to this(in order to check if it exists):

SELECT DISTINCT provides, p.distribution, component FROM packages p
   JOIN releases r ON p.release = r.release
     WHERE provides ~ ('((\s|,)'||'nfs-server'||'(\s+|,|$)|^'||'nfs-server'||'$)')
     AND r.role='testing' and p.architecture='kfreebsd-amd64' AND component='main'

output:
           provides            | distribution | component 
-------------------------------+--------------+-----------
 nfs-kernel-server, nfs-server | debian       | main

So here I get a result which contain the "nfs-server" so I know it's available.
Notice here that nfs-kernel-server also appears as a virtual package

In the case of blends_dependencies_alternatives where I have:

blend    |    task     |          alternatives          | contains_provides | dependency 
------------+-------------+--------------------------------+-------------------+------------
 debian-edu | main-server | nfs-kernel-server | nfs-server | t                 | d

I do not know which package is virtual or not so I will check for both of them like in a common result set:

 SELECT DISTINCT package, p.distribution, component FROM packages p
   JOIN releases r ON p.release = r.release
     WHERE package in ('nfs-server', 'nfs-kernel-server')
     AND r.role='testing' and p.architecture='kfreebsd-amd64' AND component='main'
UNION
 SELECT DISTINCT provides, p.distribution, component FROM packages p
   JOIN releases r ON p.release = r.release
     WHERE provides ~ ('((\s|,)'||'(nfs-kernel-server|nfs-server)'||'(\s+|,|$)|^'||'(nfs-kernel-server|nfs-server)'||'$)')
     AND r.role='testing' and p.architecture='kfreebsd-amd64' AND component='main'

output:

            package            | distribution | component 
-------------------------------+--------------+-----------
 nfs-kernel-server, nfs-server | debian       | main

Although  nfs-kernel-server does not appear in "packages" table for kfreebsd-amd64, testing release(so blend-gen-control place it in suggests), it appears in a provides column(as a virtual package) so sec-blend-gen-control place them both in Depends: nfs-kernel-server | nfs-server (it does not know which of them is a package or a virtual package so it checks for each of them in a common result set). Anyway this bug(I do not know if actually it's a bug) will appear in sec-blend-gen-control ONLY in cases where a package appears in  packages UDD table both in "package" and "provides" columns.

So due to way the different {sec-}blend-gen-controls work, they handle it these packages in a different way. I will try to think another way of handling the virtual packages, without changing current UDD state, in order to avoid that. 

PS: I hope I used proper wording to explain the issue, in case you don't understand let me know so I will try to rewrite it a better way. 

Kind regards

Emmanouil


Reply to: