[antlr-interest] expr for package dependencies

Martin Probst mail at martin-probst.com
Thu Jan 20 00:48:58 PST 2005


Hi,
if you need a relational schema this depends largely on the degree of
normalization you want to reach. E.g. you could either split up
everything into specific tables which would result in quite an amount of
tables, more programming effort and more load on the dbms. If you opt
for less normalization you could just write some of the fields into
single varchar entries which would have to be parsed by the application.
To achieve the "or" relations you might need to invent some kind of
"meta-packages" (like spell-check engine) which can be provided by
several other packages. Gentoo does this via "virtual" packages, e.g.
both Xfree and X.org provide "virtual/X11" in Gentoo.
Anyway for resolving complete dependencies you would either write a
_really_ complex SQL query or just pull the logic "A needs B, B needs C
--> A needs C" into your application.

HTH,
Martin

Am Mittwoch, den 19.01.2005, 14:13 -0600 schrieb hanasaki:
> Been looking at the way package dependencies are shown and used.  An 
> example from a Debian Linux system is shown below.
> 
> Parsing the expression isn't a big deal.  I am interested in how folks 
> would represent what is parsed to determine the below.  This is more 
> related to consuming the parsed info than actual parsing so please 
> excuse it being semiOffTopic.
> 
> does one build a db/rdbms out of the Packages.gz (this file contains 
> multiple text entries like the one shown below) that apt-get (the that 
> interprets package info and determines what gets upgraded and / or 
> conflicts) gets?
> 
> how are the "and/or" and version >=, > ... consumed, recursively? to 
> determine requested packageA needs packageB and C and B needs D and 
> maybe even D conflicts with A?
> 
> thanks.
> 
> === example from debian ====
> http://security.debian.org/dists/woody/updates/main/binary-i386/Packages.gz
> ===
> Package: abiword-common
> Priority: optional
> Section: editors
> Installed-Size: 2344
> Maintainer: Masayuki Hatta <mhatta at debian.org>
> Architecture: i386
> Source: abiword
> Version: 1.0.2+cvs.2002.06.05-1woody2
> Replaces: abisuite, abiword-xml, abiword-expat, abiword (<< 0.99.2)
> Depends: libc6 (>= 2.2.4-4), debconf, defoma (>= 0.10.2), gsfonts (>= 
> 6.0-2), libpspell-ispell1 | aspell-dictionary | aspell-en | aspell-da | 
> aspell-de | aspell-es | aspell-fo | aspell-fr | aspell-no | aspell-pt, 
> psfontmgr, xbase-clients
> Recommends: abiword-gtk | abiword-gnome, abiword-doc, abiword-plugins, 
> xfonts-abi, x-ttcidfont-conf
> Suggests: xfs
> Conflicts: abi-fonts, abisuite, abiword-xml, abiword-expat, abiword (<< 
> 0.99.2), abiword-doc (<< 1.0.2)
> Filename: 
> pool/updates/main/a/abiword/abiword-common_1.0.2+cvs.2002.06.05-1woody2_i386.deb
> Size: 533908
> MD5sum: f3d4e7035c0d0e9fcf6c53386f9305f6
> Description: WYSIWYG word processor
>   AbiWord is the first application of a complete, open source office
>   suite. The upstream source includes cross-platform support for Win32,
>   BeOS, and QNX as well as GTK+ on Unix.
>   .
>   AbiWord is still being developed. It's quite usable but not yet full-
>   featured or polished. For many applications, however, it should prove
>   effective and efficient.
>   .
>   This program includes support for reading Microsoft Word files,
>   RTF files, and many other foreign file formats. Natively, it uses a
>   custom XML-based file format.
> 



More information about the antlr-interest mailing list