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

Re: [Fwd: Re: Debian-update Gnome applet]



  Please Cc me on replies, I'm not subscribed (I'd have you Cc
apt-watch-devel as well, but alioth's mailing lists seem to be dead)

On Wed, Mar 10, 2004 at 10:28:42AM -0500, Daniel Burrows <d.burrows4@verizon.net> was heard to say:
> Content-Description: Messaggio inoltrato - Re: Debian-update Gnome applet
> > I'm not logged in as root, so this must be solved in some way. I can't
> > run apt-get update. Aptitude only loads the current cache, so it will
> > never find any updates without me manually run apt-get update. And what
> > is the point then. When updates are available it should popup som
> > authentication dialog to allow me to do updates from my user account. 
> 
>   It can; double-click on the applet when updates are available or look
> at the Preferences dialog.

  I should add that you can also make /usr/lib/apt-watch/apt-watch-slave
SUID root, in which case it will manage the global apt cache.  This is NOT
recommended, because while I do run a clearenv() if the slave is suid, and
I have tried to make the slave as secure as possible, there may be lurking
security holes in the slave or libapt.

> > So how could this be done? I don't know but wouldn't it be possible to
> > download the package-lists according to the global-apt preferenses and
> > compare them to the installed packages? I guess that might be quite alot
> > of work though... :-/
> 
>   That's what it does.

  Specifically: it copies newer package lists from the system directory
to your home directory, then runs the equivalent of an "apt-get update"
using the lists in your home directory.  When you select the "run
package manager" option or double-click the applet (when upgrades are
available), it asks for the root password, then copies the lists and
any packages that it downloaded back to the appropriate system directories.

> > It should not be an applet but a small daemon that registers with the
> > session-manager using the notification-area to indicate when stuff are
> > available for download. The preferenses should be installed as a
> > separate applet (like the control-center struff).
> 
>   I don't understand this paragraph.

  Well, except that it appears to be talking about a program that just
starts in the notification area.  An additional UI should be fairly
straightforward to add: all the mechanism of the program is in
UI-independent backend code (actually separated into another process),
and for a notification-area applet I could probably reuse some of the
Gnome applet code.

  There isn't a notification-area applet right now because a Gnome
applet is superior for my personal use, and I wanted to start with the
UI that I would want to use.  Plus, the notification-area only lets you
show an icon IIRC, so it's not really an option until I have icons to show.
(it's also not obvious how to create a notification-area
applet...although I don't suppose the documentation could possibly be
worse than that for the Gnome libraries)

  The notification area also has the downside that you could only run
one instance of the applet at once (the Gnome panel makes it possible
for several copies of the same applet to have different option settings --
I'm not sure this actually works yet, but it's at least a theoretical
possibility) and that the applet wouldn't automatically be remembered for
the next time you log in.  Since I've had several requests for this, I
assume there are people who don't mind the drawbacks, but it was as much
as I could do to get one UI put together for the first release.  (it's
always possible to hack around these drawbacks by managing multiple copies
of the apt-watch notification-area program myself, of course, but it
would be fairly tedious and the panel manages this automatically for me)

  The "daemon" notion does give me one interesting idea, though.  Right
now, each applet runs a separate copy of the slave process; it might be
worthwhile to allow multiple applets to connect to the same slave.  That
would avoid a problem that currently exists (multiple monitors on the
same computer run by the same user don't play together very nicely).
Communication could take place, eg, via a UNIX filesystem socket in
~/.apt-watch.  I think this would be fairly easy to add as an extension
to the current program.

  I suppose you could also create a global daemon that anyone could
connect to, but that makes me a bit uneasy.  (my confusion earlier was
partly caused by the fact that you seemed to be suggesting this)

  Daniel

-- 
/-------------------- Daniel Burrows <dburrows@debian.org> -------------------\
|             "We've got nothing to fear but the stuff that we're             |
|              afraid of!" -- Fluble                                          |
\-Evil Overlord, Inc: planning your future today. http://www.eviloverlord.com-/



Reply to: