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

Re: [GSoC] Rewriting tasks.py to exclusively use UDD



Hi,

On Mon, Jun 29, 2015 at 12:51 AM, Andreas Tille <andreas@an3as.eu> wrote:
>
> Hi,
>
> On Sun, Jun 28, 2015 at 05:02:11PM +0530, Akshita Jha wrote:
> > I had almost completed rewriting blendstasktools.py to use UDD. I was
> > testing it and making some changes and now I have got really confused. Can
> > you please help me understand things a little better ?
> >
> > In tasks.py,
> >
> > -> 'tasks' object of class Tasks is created.
> >
> > -> class Tasks first reads the configuration file of the blend.
> >     -> It has a function _InitMetapacakgekeys, which gets all the tasks
> > inside the blend.
> >        The query for this is :
> >             query = "SELECT task FROM blends_tasks WHERE blend = '%s' ORDER
> > BY task" % (self.blendname)
> >
> >     -> GetAllDependencies() gets the description and its translations of
> > all the metapackages. Also, for each task an object of class
> > TaskDependencies is created.     The __init__() of class TaskDependencies
> > has:
> >
> >         self.dependencies = {}
> >         for pkgstat in pkgstatus:
> >             self.dependencies[pkgstat] = []
> >
> >     pkgstatus is a global dictionary and has keys like
> > official_high,official_low..... etc. How can I get the status of the
> > dependencies from UDD ?
>
> Official_high are those packages that are declared Depends (or Recommends
> which is technically identical) and official_low are packages that are only
> suggested.  This is kept in the depends field.  For instance you get all
> official_low packages of Blend Debian Med in task bio by
>
> udd=# select * from blends_dependencies where blend = 'debian-med' and task = 'bio' and dependency = 's' ;
>
> When using ... dependency = 'd' you get the official_high packages.


What is the relation between dep.pkgstatus and dep.dep_strength ?

udd=# SELECT DISTINCT b.dependency FROM blends_dependencies b;
 dependency
------------
 a
 i
 d
 r
 s
(5 rows)
 
These are the dep_strength(s).

 if dep.dep_strength == 'd' or dep.dep_strength == 'r';
    pkgstat = 'official_high'
 elif dep.dep_strength == 's':
    pkgstat = 'official_low':
 elif dep.dep_strength == 'i':
    pkgstat = 'ignore'
 elif dep.dep_strength == 'a':
    pkgstat = 'avoid'

But in the old_blendstasktools.py there are pkgstatus like 'new', 'unknown', 'experimental', 'wnpp' and non-free. Are these components ?

udd=# SELECT DISTINCT component FROM packages;
       component      
-----------------------
 contrib
 main
 non-free
 main/debian-installer
(4 rows)

Can you please clarify this ?


Thanks,
Akshita

Reply to: