a few short questions
sorry to bother you with this, but I don't know whom else I could ask.
I have written a program that allows convenient searching and browsing
of /var/lib/dpkg/available and want to be sure about some dpkg "internals"
I use (nothing that could be found in the dpkg internals/programmers
manual). Perhaps someone can spare a few minutes for my questions.
I rely on the following assumptions which (I think) are true for current dpkg
versions and want to have an estimate for X in a 'Depends: dpkg (<< X)' clause.
1. Available packages are listed in /var/lib/dpkg/available in 'control file'
format (new fields don't hurt).
2. As I understand, processes that modify anything in /var/lib/dpkg do lock
/var/lib/dpkg/lock with fcntl() and don't release the lock unless
everything there is in a sane state again. (Note: I don't want to lock,
just to check for an existing lock).
My personal guesses are "-infty you fool", 1.5, 2.0, 99
I have also thought about using dpkg to read 'available' instead of
own code. This raises parallel questions:
3. Can the behaviour of 'dpkg --get-selections' and 'dpkg --status' be
expected to stay the same even if available changes format?
4. Do the dpkg options mentioned in 3. notice that dpkg's data is being
modified when running as *non-root* ?
If yes, how do they? (I can read sources, just tell me where to look).
If no, to what extent can they possibly fail (dump core, lock up,
print oddly formatted bogus, print well formatted bogus, print outdated
but otherwise correct data, ...)?
Bj"orn Brill <firstname.lastname@example.org>
Frankfurt am Main, Germany
Just in case you are curious: <http://fs.math.uni-frankfurt.de/~brill>