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

collab-qa: udd/sql/debvercmp.sql (Was: UDD and DEHS)

On Fri, 13 Feb 2009, Andreas Tille wrote:


and injects the following structure in UDD:

   package, language, version, distribution, release, component (='main'),
   description, long_description

Sounds good. Maybe reorder them a bit:
   package, version, distribution, release, component (='main'),
   language, description, long_description

I actually have no strong opinion about the order - you invented UDD
and have probably some bigger scheme in mind ...
I rather wonder what you think about component because according to
current DDTP data it is always 'main' - but in the future this might
perhaps change.  On the other hand the info is reduncant because you
might be able to obtain
  distribution, release, component
from packages table if you have
  package, version  .
I would like to know what degree of normalisation you might have in mind.

I just learned that I need to store the version together with description
translations. So my suggested table structure for gathering DDTP translations
for UDD is

       package      text,
       distribution text,
       release      text,
       component    text,   -- == 'main' for the moment
       version      text,   -- different versions for a package might exist because some archs
                            -- might have problems with newer versions if a new version comes
                            -- with a new description we might have different translations for
                            -- a (package, distribution, release, component, language) key so
                            -- we also need to store the version number of a package translation
                            -- In case there are different versions with an identical description
                            -- this field will hold the highest version number according to
                            -- dpkg --compare-versions
       language     text,
       description  text,
       long_description text,
       md5sum       text,   -- md5 sum of the original English description as it is used
                            -- in DDTP.  This is obtained via
                            --   md5(description || E'\n' || long_description || E'\n')
                            -- from packages table
    PRIMARY KEY (package, distribution, release, component, language)

(Probably the comments should be done as "COMMENT ON" statements - but I have
 no idea whether you prefer to use comments like this.)

Regarding the version number I found


which contains a function which implements `dpkg --compare-versions` in SQL
which would be really handy for my task.  Unfortunately this function seems
not to exist in the live database:

udd=> \df debvercmp
                   List of functions
Schema | Name | Result data type | Argument data types --------+------+------------------+---------------------
(0 rows)

Any reason for not using this function or rather any chance to use it somehow?

BTW, I've got some preliminary code for the DDTP and ftpnew gatherers.  Should
I commit this to SVN in the (not fully working state) now or should I finish my
work first and commit then?

Kind regards



Reply to: