Re: RFC: pkg-order -- Specs and design
Hi,
>>"Rob" == Rob Browning <osiris@cs.utexas.edu> writes:
Rob> Manoj Srivastava <srivasta@datasync.com> writes:
Manoj> * The package should be able to read installed packages from
Manoj> /var/lib/dpkg/status -- or one or more files in the samefomat
Manoj> supplied by the user (*must* have the status field)
Rob> This could cause a race condition if somone is running
Rob> dpkg/dselect at the same time. This could be handled by asking
Rob> dpkg (or perhaps some forthcoming library) for the status instead
Rob> of reading the file directly. dpkg should be responsible for
Rob> handling the locking.
Most interesting. *Is* there a way of getting the status from
dpkg, short of parsing the output of dpkg --get-selections or dpkg -l
and calling dpkg -s with all the selected packages?
I note that since version 1.0.6 or so dpkg has been using fcntl
as the underlying locking mechanism. Does it indeed lock the status
file so? in which case, while we wait for a more formal method the
get at the status file, we could avoid race conditions by using fcntl
based advisory locking ourselves.
comments?
manoj
--
"A box of punchcards could theoretically store 240,000 bytes of
information, and usually stored less than 80,000. Think about it."
Karlie-q
Manoj Srivastava <url:mailto:srivasta@acm.org>
Mobile, Alabama USA <url:http://www.datasync.com/%7Esrivasta/>
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com
Reply to: