[haiku-development] Re: Time to add SoftwareUpdater to build?

  • From: brian@tycho.email
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 24 Apr 2017 14:28:40 -0400 (EDT)



    On April 24, 2017 at 1:41 PM Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> 
wrote:

    On Mon, Apr 24, 2017 at 01:13:13PM -0400, brian@tycho.email wrote:

        > > 
        Which also brings up another issue regarding the current 
notification system, which is if "SoftwareUpdater check" is run on a 
schedule and does find updates and displays a notification, depending on 
user settings the notification may disappear before the user sees it if 
they are not using the system at the time. The current Haiku build does not 
have a history view or a dock for missed notifications, so the check mode 
is somewhat hampered by this missing feature. Also there is no built-in 
task scheduling system, so right now I am conflicted if a custom scheduling 
system for just running the check should be added to the package daemon or 
not.

    > 
    For the notifications, I think you have some work in progress already?
    :)


True, I added a notification history list to the Notifications preflet but 
hadn't completed a "preview" view to see what the notifications looked like.  I 
would need to extract the notification view class from being hardcoded to it's 
container class in the current notification shelf.  Maybe I will return to that 
project.  Getting the missed notification shelf working properly was kicking my 
butt and I needed a break from it.


    For the periodic check, I think the best way would be to add a 
cron-likesystem, either as a new server or as part of the launch_daemon. Or 
maybe
    BRoster, not sure wht's the most appropriate place for it.
    Doing it in package_daemon sounds like it would be very specific to the
    task of running SoftwareUpdater, however, and I think I prefer a more
    generic solution.


Yes it would be very specific, but shouldn't be too hard.  I was thinking just 
one BMessageRunner that is created to trigger at the next time due to run the 
check.  The user could specify when to run the check (daily, weekly, monthly).  
Keep track of the last run time and user defined interval in a settings file to 
recreate the message runner across reboots.  Not ideal, but how long until we 
have a more generic solution?  Or leave it up to the user to install their own 
scheduling software if they want this feature.  I think there are ones in 
HaikuDepot (cronie?) but I've not tried any.


-Brian

Other related posts: