[packagekit] Help request to make a PK client communicate with debconf

Silvan Calarco silvan.calarco at mambasoft.it
Wed Feb 18 12:48:37 PST 2015


In data lunedì 16 febbraio 2015 09:24:08, Richard Hughes ha scritto:
> On 15 February 2015 at 23:05, Silvan Calarco
> 
> <silvan.calarco at mambasoft.it> wrote:
> > I took the code of pkcon as a reference client implementation:
> Good plan, this is the most tested path. I think gnome-packagekit
> tries to deal with debconf too IIRC.
> 
> > although it
> > won't show any interaction with debconf, it at least doesn't lock like my
> > client does, but examinating it deeply I noticed that it uses some private
> > headers which again made me stuck.
> 
> Ohh? Which ones did you need to use?

Don't know exactly, I've been trying many way to access some debconf helper 
functions but indeed pkcon doesn't do this (at least I suppose, I haven't seen 
it so far asking questions from command line to the user), so maybe the 
problem here was mostly just the way it activates console debugging, which btw 
partly I solved using your suggestion of running packagekitd -v.

> >  pkcon -v (debug) is very useful but debug
> > 
> > functionality seems to be also private so I can't enable PackageKit debug
> > information on my client, which would be useful.
> 
> You can run the daemon with --verbose to see the daemon side.
> 
> > In short my question is whether and how a non-gui client app could
> > communicate with debconf during packages installation.
> 
> I'm not a Debian guy, and so I don't know a lot of the details. Maybe
> Matthias could chime in and give some hints?

After a lot of debugging I managed at least to avoid installation lockups 
mainly by using, like pkcon does, pk_task_install_packages_async() instead of 
pk_tast_install_packages_sync().
Unfortunately I wasn't able to communicate with debconf yet, after packages 
installations I get a lot of debconf-communicate stuck processes which are 
called with DEBIAN_FRONTEND=dialog in their environment. Other aptcc scripts 
are run with DEBIAN_FRONTEND=passthrough and those now work, maybe I can try 
to communicate via the socket with those but I'm not sure this would be 
useful.
I suppose the real place to get and give debconf questions and answers is 
defconf-communicate, which is managed in lib/packagekit-glib2/pk-client.c 
(private). I see in pk_client_create_helper_argv_envp() that it can set 
DIALOG=dialog|kde|gnome (no such thinks like passthrough/socket), and fear 
that what I want to do (communicate through a command line tool without user 
interaction) is simply not possible unless patching Debian or e.g. dialog. Of 
course I would be happy if some of the developers could say I'm wrong :)

Thank you for your help!

Regards,
Silvan

> 
> Richard.
> _______________________________________________
> PackageKit mailing list
> PackageKit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/packagekit

-- 
mambaSoft di Calarco Silvan @ http://www.mambasoft.it
openmamba GNU/Linux development @ http://www.openmamba.org



More information about the PackageKit mailing list