I'm looking at debian-edu/tasks/desktop-other. This has:> I am not quite sure I unsterstood this case. Can you give me an example?
Depends: gecko-mediaplayer | mozilla-mplayer | kaffeine-mozilla | mozilla-plugin-vlc | totem-mozilla
Recommends: default-jre | openjdk-6-jre, icedtea6-plugin
I would turn this into
blend | task | package_s_ | dependency | distribution | component
-----------+---------------+---------------------------------------------------------------------------------------------+------------+--------------+------------
debian-edu | desktop-other | gecko-mediaplayer | mozilla-mplayer | kaffeine-mozilla | mozilla-plugin-vlc | totem-mozilla | d | debian | main
debian-edu | desktop-other | default-jre | openjdk-6-jre | d | debian | main
debian-edu | desktop-other | icedtea6-plugin | d | debian | main
...
So you can take over 1:1 from package_s_ (a suggestion more reasonable
column name would be welcome as well as a decision whether *this* table
should be named blends_dependencies and the other currently existing
table rather blends_packages).
Your initial suggetsion would fail say for debian-multimedia where
it might be perfectly possible to have some
Depends: gecko-mediaplayer
without any alternative (or whatever). Your suggestion to just join
the alternatives behing gecko-mediaplayer would break and you could
also find different sequences of alternatives - so I think we somehow
need to preserve the content of the tasks files in a clever way.
The
only chance that might safe us from using two tables would be some
view that splits up the '|' in the table I mentioned above and adds
extra rows for every alternative. This could require some bit of
SQL magic. But all in all our tables are not really expensive and if
you do not know such clever SQL tricks that turn the table above into
blend | task | package | dependency | distribution | component
-----------+---------------+--------------------+------------+--------------+------------
debian-edu | desktop-other | gecko-mediaplayer | d | debian | main
debian-edu | desktop-other | mozilla-mplayer | d | debian | main
debian-edu | desktop-other | kaffeine-mozilla | d | debian | main
debian-edu | desktop-other | mozilla-plugin-vlc | d | debian | main
debian-edu | desktop-other | totem-mozilla | d | debian | main
debian-edu | desktop-other | default-jre | d | debian | main
debian-edu | desktop-other | openjdk-6-jre | d | debian | main
debian-edu | desktop-other | icedtea6-plugin | d | debian | main
...
(which is our current table) we might go with two tables.
I'm sure
there will be a way to create a view to get this but it is error prone
and definitely not fast for simply saving some bytes on a hard disk ...
However, I think we should start with some documentation about the
motivation for those two similar tables to make sure people will not
stumble upon it in future.
> > I'm tempted to just throw into the table what is foundI admit I do not understand this paragraph (in exchange to mine which
> > between the ',' in a Depends line. I'll keep on thinking about this,
> > thought.
> >
> This can also be a solution for the moment, I will just have to break my
> query for blend-dependencies into two parts(because that way I will not be
> able to full outer join "blend_dependencies" with the "packages" table on
> "package" field, but that's ok, it can done into two parts and get the same
> results as we get now).
was surely not understandable).