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

Running dpkg



It looks like actually doing the install involves running dpkg. This gets
a little tricky with an X app, especially if it was run from a wm menu or
the like and not from an xterm. 

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

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?

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 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."

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.

Havoc




Reply to: