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

Re: RFC: DKMS - Dynamic Kernel Module Support



Le jeudi 11 septembre 2008 à 21:44 +0200, David Paleino a écrit :
> On Thu, 11 Sep 2008 20:24:53 +0200, Josselin Mouette wrote:
> > You cannot install packages in a triggered script, or in whatever way
> > that will be determined from within a package itself.
> 
> Is there any particular reason for this?

Yes, launching dpkg requires locking the database, and the database is
already locked within a dpkg run.

> I've seen aptitude doing something similar (i.e. running multiple times with a
> single launch)... am I wrong?

Aptitude may launch dpkg several times, but the order of the runs is
determined before.

> Let me clarify the idea: isn't it possible to make a "dkms trigger", that
> runs on installation of linux-image-*? It should do the following:
> 
> a) checks if autoinstall is set in dkms configuration;
> b) if set to yes:
>    1) start the install of the corresponding linux-headers-* package (a way to
> programmatically determine the package name of this?);
>    2) start the compilation of "in-tree" modules; (i.e. modules handled by dkms)
> c) if set to no:
>    1) print a message suggesting the installation of the above package;
>    2) print a message suggesting what to do next
> 
> From your reply, I understand that b1) wouldn't be possible to achieve. Why?
> Can't triggers start external programs?

Triggers are run from within dpkg, and cannot launch new APT/dpkg
processes. And in all cases, it is fundamentally wrong to assume that
APT can be invoked.

-- 
 .''`.
: :' :      We are debian.org. Lower your prices, surrender your code.
`. `'       We will add your hardware and software distinctiveness to
  `-        our own. Resistance is futile.

Attachment: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=


Reply to: