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

Re: self-depending packages



On Tue, 2005-03-01 at 12:13 -0600, Adam Heath wrote:

> On Tue, 1 Mar 2005, Tollef Fog Heen wrote:
> 
> > * Antti-Juhani Kaijanaho
> >
> > | On 20050228T204520+0000, Andrew Suffield wrote:
> > | > On Mon, Feb 28, 2005 at 09:49:41PM +0200, Antti-Juhani Kaijanaho wrote:
> > | > > On 20050228T164806+0000, Andrew Suffield wrote:
> > | > > > Unfortunately apt breaks the code. If you use dpkg directly it'll
> > | > > > work. If you use apt it'll pick a random and unpredictable
> starting
> > | > > > point.
> > | > >
> > | > > Doesn't apt usually unpack all packages first and then configure them in
> > | > > one run, so that shouldn't matter?
> > | >
> > | > dpkg does the same thing
> > |
> > | So how does apt break it but using dpkg doesn't?
> >
> > apt invokes dpkg on the command line and due to maximum command line
> > length it sometimes is split in an unfortunate place.
> >
> > This will be fixed once dpkg is librarified.
> 
> Er, no, it won't.
> 
> That part of dpkg is not set to be turned into a library.
> 
It is; one of my plans is that libdpkg be functionality equivalent to
the dpkg command-line tool.  In fact, I intend the command-line tool to
be just an option/argument parser for the library.

This has been discussed several times on the mailing list and with the
maintainers of the other tools (APT, etc.)

The requirements suggest an API almost, but not quite, entirely unlike:

	DpkgRequestList *list = NULL;

	dpkg_request_list_append_new (&list, DPKG_REQUEST_INSTALL, filename1);
	dpkg_request_list_append_new (&list, DPKG_REQUEST_INSTALL, filename2);
	dpkg_request_list_append_new (&list, DPKG_REQUEST_INSTALL, filename3);
	dpkg_request_list_append_new (&list, DPKG_REQUEST_INSTALL, filename4);

	dpkg_request_list_run (list);


This wouldn't be limited by command-line length, so you could happily
pass a list of a million packages to be installed in one run (limited by
memory, of course).

Scott
-- 
Have you ever, ever felt like this?
Had strange things happen?  Are you going round the twist?

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: