Linux Lite Forums

Full Version: Update Checker
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10
That is awesome, shaggytwodope.  Smile
now you are just teasing us....
(02-24-2016, 12:31 PM)Wirezfree link Wrote:now you are just teasing us....


[Image: teasing_hurts_big.jpg]
So, new video. Showing some updates + state change (checks for crap in cache after it sees any updates run etc). Video really shows it better then I can explain lol.

Also new cache updating method.. Jerry might be happy with that. (Note lack of sudo needed.)

https://puu.sh/nk1mx/48904caeac.webm



It should all be ready to go for the most part soon, refinement with icon's and dialog's down the road.
shaggytwodope, how about an option to switch between the dark and light tray icon from the right-click menu?

In /usr/scripts/updates-gui is a method that kills synaptic and gdebi-gtk if they are open.
Code:
# Kill off any package managers that may be running
if [ "$(pidof synaptic)" ]; then
     sudo killall -9 synaptic
fi
if [ ! -z "$(pgrep gdebi-gtk)" ]; then
     killall -9 gdebi-gtk
fi
If there is an install process running that causes problems.
What if a loop runs untill the lock is released or the user clicks Cancel?
Something like:
Code:
function checklock () {
# Checks for exclusive lock and wait until package managers are closed
while  fuser /var/lib/dpkg/lock 2>&1 >/dev/null  ; do
   echo "# Waiting for other software managers to finish..." $"\n"
   if [ "$(pidof synaptic)" ]; then
      echo "# Please close any open package managers..." $"\nsynaptic"
   fi
   echo 1
   sleep 1
   echo 30
   sleep 1
   echo 60
   sleep 1
   if [ ! -z "$(pgrep gdebi-gtk)" ]; then
      echo "# Please close any open package managers..." $"\ngdebi-gtk"
   fi
   echo 95
   sleep 1
done | (if ! zenity --progress --title="$APPNAME - close any open package managers" --percentage=20 --auto-close;then killall $(basename $0); exit; fi)

}
checklock
Icon's are not finalized at all. This is up to Jerry or anyone that would like to create or find icon's to use. Some can be theme neutral, so it's a non issue if done right. Short of that a preferences menu may come along in time to permit changing the icon's. I never planned to provide "options" with this tool. But it seems it's only natural. (short of it is.. the current icon's are nothing more then placeholders)

As far as the update script, I've not worked on it at all, short of adding dist-upgrade to it recently. If you have any improvement ideas to that.. open a PR. I've not had time myself to go into detail with it. (Needs some linting fixes lol)  I think in addition to your fix, we may want to consider a network connection testing method before executing. Quite similar to what you've provided.
@updater: An option to change the update interval, that would be the most usefull option.  Smile

@Network connection testing: great idea
In lite control center, we used this method to check the connection to the internet:
Pinging Gooogle dns servers.
Code:
ping -c 1 8.8.8.8 2>&1 | grep "connect: Network is unreachable" &>/dev/null
            if [ $? = 1 ]; then
                   echo Active
            else
                    echo Not connected
            fi
But if we use this method when google is down the script would not update. lol
misko_2083,

Hurry and post something else.  You're stuck on a bad luck number of posts.
I'd going to work on this for sometime tonight, if anyone has any idea's it would be great time to mention it...

So far I'm going to try and build a gui tool for perfs in updater. This will include:

- update interval adjustments

- possibly toggling notifcations


- toggle autostart (removing from right click menu)
Sounds good shaggy.
Pages: 1 2 3 4 5 6 7 8 9 10