[antlr-interest] expr for package dependencies

Anthony Youngman Anthony.Youngman at eca-international.com
Thu Jan 20 03:14:17 PST 2005


Look at post-relational. The obvious problem is that I don't know of a
fully-functional Free implementation. MaVerick is getting close, though
:-)

Basically, that gives you a normal-form database, but that would
probably drive relational purists nuts. Describing it in terms I don't
quite understand myself ...

Think of each "row" in a post-relational "table" as an object - bit like
a relational view, or actually probably more like a tree. It's been
normalised, so a mechanical transform enables you to present it to a
relational client. And you can relate fields across tables, although the
mechanism is very different from a SQL/relational join.

I've been thinking about this sort of thing, and was thinking that
trying to get MaVerick or some other post-relational engine into either
an LDAP server or gentoo portage would actually be an excellent
demonstration of its power ...

For your problem, once you've parsed all the dependencies into a
database, I would use a simple procedural routine to look for loops etc.

Cheers,
Wol

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Martin Probst
Sent: 20 January 2005 08:49
To: hanasaki
Cc: ANTLR Interest
Subject: Re: [antlr-interest] expr for package dependencies

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.
> 



****************************************************************************

This transmission is intended for the named recipient only. It may contain private and confidential information. If this has come to you in error you must not act on anything disclosed in it, nor must you copy it, modify it, disseminate it in any way, or show it to anyone. Please e-mail the sender to inform us of the transmission error or telephone ECA International immediately and delete the e-mail from your information system.

Telephone numbers for ECA International offices are: Sydney +61 (0)2 8272 5300, Hong Kong + 852 2121 2388, London +44 (0)20 7351 5000 and New York +1 212 582 2333.

****************************************************************************



More information about the antlr-interest mailing list