Something that users can opt-in or opt out of that auto updates haiku in the background instead of having to manually install or check for updates so for instance you decide to do something crazy like run haiku as a dedicated SSH server for some reason and you want a server to reboot an auto update automatically
Or maybe something like crontab that runs programs at certain times
Could be a setting in the SoftwareUpdater application to auto-launch in a settable interval. Disabled by default. I still want the SoftwareUpdater to pop up and show me what’s about to be updated, giving me the chance to cancel.
I understand there might be a case of a bad update or something you don’t want to update or it might break things
To me it’s more fundamental. Users should always be aware and in control what’s going on with their system.
Absolutely true
Something that checks in the background if there are updates available and exits silently when there’s nothing. If there are some updates available, have an icon in Deskbar as a reminder. Clicking on it would ask if you want to launch SoftwareUpdater now or keep that for later. Also have an option to show the alert immediately.
I wrote a script a few months back, works great…
Create a text file in /boot/home/config/settings/boot/launch with the following, then change the permissions on the file to make it executable (right click- get info- permissions- execute XXX)
#!bash
while true;
do
TEST_OUT=$(yes no | pkgman update 2> /dev/null);
case "$TEST_OUT" in
*Continue*)
SoftwareUpdater
;;
esac
sleep 1h; # How often to check for updates 1h= every hour, "1d"=1/day. etc..
done
Did you try with
pkgman update -y
?
In my script? Yes, it caused an endless loop when the answer was other than yes or no.
All the script does is use pkgman to test if there is an update and if so launches SoftwareUpdater so you can choose to install updates.
Or I can use cronie to check for updates every hour or so
Yes but then you will see the update check every hour whether there is an update or not.
With the script you are only prompted with the update dialog if there is an update.
Now that I think about it that would probably be a better idea
#!bash
app_name="SoftwareUpdater"
app_path=/boot/system/apps/"${app_name}"
app_sig=application/x-vnd.haiku-softwareupdater
while true;
do
TEST_OUT=$(yes no | pkgman update 2> /dev/null);
case "$TEST_OUT" in
*Continue*)
notify --group "${app_name}" --messageID "${app_name}" --title "${app_name}" --icon "${app_path}" --onClickApp "${app_sig}" "There are some updates available"
if ! desklink --list | grep -q "${app_name}" ; then
desklink_args+=("cmd=Remove Replicant:desklink --remove=${app_name}")
desklink "${desklink_args[@]}" "${app_path}"
fi
;;
esac
sleep 1h; # How often to check for updates 1h= every hour, "1d"=1/day. etc..
done
in this way you are notified when an update is available, the notify view is less intrusive than the whole updater window, and adds a replicant to the deskbar if you want to update later
#!bash
app_name="SoftwareUpdater"
app_path=$(finddir B_APPS_DIRECTORY)/"${app_name}"
app_sig=application/x-vnd.haiku-${app_name,,}
if ! desklink --list | grep -q "${app_name}" ; then
TEST_OUT=$(yes no | pkgman update 2> /dev/null);
case "$TEST_OUT" in
*Continue*)
notify --group "${app_name}" --messageID "${app_name}" --title "${app_name}" --icon "${app_path}" --onClickApp "${app_sig}" "There are some updates available"
desklink_args+=("cmd=Install update(s):pkgman update -y")
desklink_args+=("cmd=Full Sync:pkgman full-sync -y")
desklink_args+=("cmd=Remove Replicant:desklink --remove=${app_name}")
desklink "${desklink_args[@]}" "${app_path}"
;;
esac
fi
second version meant to be used with a crontab, deskbar replicant is used as a flag, there is no need to re-run the update check if there is a replicant already, plus one can update/full-sync directly from the replicant without the SU GUI
Thats cool too
Personally I like going to my computer and seeing the updates avalable, it’s like a package just arrived in the mail…
Plus I use Deskbar like a launcher with desklinks, so an icon would not be as noticable for me…
But I suppose both options could be added to SoftwareUpdater itself-
- “Notify me and show replicant in Deskbar when updates are available”
- “Open SoftwareUpdater when updates are available”