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

Re: Running dpkg



On Sun, 29 Nov 1998, Havoc Pennington wrote:

> Anyway, so question 1 is, this is how it works, right?

Yep, define debug::pkgdpkgpm=true and it will not try to run dpkg but only
print the command lines.

> Question two is: to handle this in gnome-apt, I propose to use the Gnome
> terminal widget. The terminal widget can come up in an application-modal
> window, and things will be kind of lame but not horrible. However, the
> terminal widget has an interface like this: 
>  
> pid = zvt_term_forkpty(term_widget);
> 
> i.e., I need to do the fork myself so that the child gets connected to the
> widget and not the original stdin/stdout. So: could pkgDPkgPM perhaps have
> a function:
>  virtual pid_t fork()
> 
> with semantics identical to the usual fork(), which I can replace with
> this terminal-widget-fork thing?

Fork before you call the installer function and call the installer from
the new process. That is probably the best way to do things
 
> Question three: I only see how to do "Complete run" from the Actions menu
> described in the UI design. Are the menu items to only install, remove, or
> upgrade implemented in apt-pkg? 

I thought wichert removed those. You can't do anything but a complete run.
Well you could, but you'd have to munge the state untill you got something
like a non-complete run but I think that is pretty useless.

> I have Update and Install working now I think, but you have to run from an
> xterm so you can interact with dpkg, and gnome-apt doesn't sanity check
> when you mark packages so it's possible to get yourself in a state where
> it won't work. If I can get up the guts, I might run it as root and see
> what happens if dpkg doesn't die with "you're not root."

It is important to NOT call the installer if there are any broken packages
if that is fine then it will always do something. You -must- perform an
essential check exactly as apt-get does before allowing the user to
continue.

> But, you can definitely download the packages and package files, and I
> have all kinds of crazy progress meters. I'm almost done with a cheesy
> text search, and Lalo is hard at work on the information panes; we could
> have a useful program in a matter of days.

As soon as someone figures out how to compile it :>

Jason


Reply to: