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

libdebctrl Update



Dominique:

Just a heads up on what I've been working on for the past few days.

I refactored the code so that errors in parsing are handled/kept
separately from errors in the control file, which is helpful because
it separates the file parsing (picking out the blocks from a file) and
the actual semantic part (the Control object). This means it will be
possible (and relatively painless) to create a new debian/control file
from libdebctrl.

I have been working on figuring out how to parse architecture stuff.
As I discovered from the debian-policy mailing list, not all
combinations of operating systems match up with CPU architectures.
What this means is that I cannot store architecture information
separately from the operating system -- they have to be paired.

I was thinking about a good way to do this today, and was considering
something like a two-dimensional array, where there are architectures
as columns and operating systems as rows:

            i386   amd64
Linux    X
Solaris X          X

Means that Linux supports i386 only, and Solaris supports both i386
and amd64. So this provides some basic validation.

However, I still don't know how to represent relationships inside
packages, for example where you have something like the example in the
Debian Policy Manual section 7.1:

Build-Depends: foo [!i386] | bar [!amd64]

The above just means foo works on everything except linux-i386, and
bar works on everything but linux-amd64. I really have no idea how to
flexibly and efficiently note that sort of relationship as a data
structure, so that's what I'm currently stuck meditating about.

Cheers,

Jonathan

Cc: The Debian Perl group in case you happen to be interested in what
I'm working on :-)


Reply to: