You are not logged in.

#1 2016-09-21 19:59

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

A simple small update notifier

I have written an apt updater for Q4OS and am now ready to launch.

When installed you will have apt-updater in your menu, you can launch it from there and it will wait (currently set to 2 minutes) before it does anything, (this is to allow the system to start when the app starts automatically on boot) then it will check for updates at regular intervals (currently set to 1 hour) it does not refresh the apt db as Q4OS already has a structure in place to do this on a regular basis.
You will also have the option to uninstall from the main menu.
Anyone who wishes to test this out can do so via the attached installer, simply download and double click for automatic installation. As always feedback would be appreciated smile

Thanks for reading

Dai

EDIT:
I have now abandoned this project as the Q4OS updater is a far superior product and is highly recommended. Thank you to everyone that has downloaded and used it.

Last edited by Dai_trying (2019-03-06 21:57)

Offline

#2 2016-09-22 08:46

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,465
Website

Re: A simple small update notifier

Dai's updater is quite lightweight, safe and works just fine, we can recommend to anyone to try it out. The source code is available here https://sourceforge.net/p/q4os/apt-upda … ster/tree/, it could be used on another distros as well. We would like to fine tune the updater and integrate it into the Q4OS in the future, if we would be able to code it under Python-TQT. Unfortunately, it's not directly possible now, due to some bugs in Python-TQT.

Offline

#3 2016-10-08 09:11

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: A simple small update notifier

I have changed the updater slightly to remove the main synaptic window while updating. I have posted the new installer in the first post.

Last edited by Dai_trying (2016-10-08 09:12)

Offline

#4 2016-10-09 05:56

aldrik
Member
From: france
Registered: 2016-04-12
Posts: 65

Re: A simple small update notifier

hello !
i must uninstall the other updater to test it ?
thank you

Offline

#5 2016-10-09 08:45

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: A simple small update notifier

No that is not necessary, you can run them both and you will likely see two update icons in the system tray and you can select which one to use for updating. I have kept both updaters on one of my systems to see if it caused any issues and so far I have not found any.

Offline

#6 2016-10-10 06:08

aldrik
Member
From: france
Registered: 2016-04-12
Posts: 65

Re: A simple small update notifier

Thank you
I'll test that !
@+

Offline

#7 2016-10-10 11:10

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: A simple small update notifier

Thanks for testing. Please let us know if you have any issues or queries at all, I will be working on this and would value any feedback. smile

Offline

#8 2016-10-10 13:11

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,465
Website

Re: A simple small update notifier

We have observed a possible issue. Notifier probably should stop checking, if upgrade is in progress. It could evaluate broken packages dependencies, if hit a check during the upgrade. It was the case we observed several times - Notifier printed out 'broken dependencies..' message in terminal window and got crashed. Of course, dependencies were not broken, but temporarily inconsistent at some critical moment during the upgrade process. Tested with the switch '-i1' to check updates every single second.

Offline

#9 2016-10-10 13:51

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,329

Re: A simple small update notifier

Dai - Does your app automatically disable unattended upgrades - would have the same issue as noted by Q4OS team above.

Offline

#10 2016-10-10 14:10

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: A simple small update notifier

That's a biit spooky, I found that issue this morning when trying to do something in my testing installation. It is not too difficult to fix, at the moment the given error simply closes the application but it could easily give user a message or ignore it (temporary fix). I have been looking at what apt uses as a lock and I have found it uses /var/lib/dpkg/lock (and maybe others) and am looking into checking the file lock before attempting to check for updates, which would be the intended proper fix for this, the biggest problem is that apt doesn't maintain a lock throughout the upgade operation, it is released while downloading and then locked again for instalation. But I will figure something out to make it more robust. smile

@Q4OS Team
Thanks for letting me know guys

@bin
The app doesn't disable anything on the system, it is currently a very simple apt-check, it could possibly cause conflicts like the above issue, but will be fixed quite soon.

Offline

#11 2016-10-10 16:33

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,465
Website

Re: A simple small update notifier

You could use 'qapt_lock.exu' tool to check, if dpkg is just being locked:
$ /usr/share/apps/q4os_system/bin/qapt_lock.exu
$ echo $?
Return '1' if locked otherwise '0'

Offline

#12 2016-10-10 16:36

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: A simple small update notifier

Thanks for that, I've just been testing a few different methods and this could be easier to implement. smile

Offline

#13 2016-10-10 19:40

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: A simple small update notifier

I have posted an updated version (0.0.1-3) in the first post, it should work correctly now, and if apt is locked when a check is done it will wait 10 seconds and try again (in a loop until successful).

Offline

#14 2016-10-17 09:49

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: A simple small update notifier

I have updated the installer to not use the /program_files directory, and instead use /usr/bin and /usr/share. nothing has changed in the updater application, just the installer. Version 0.0.1-5 (In top post)

Offline

#15 2016-10-17 16:58

aldrik
Member
From: france
Registered: 2016-04-12
Posts: 65

Re: A simple small update notifier

Hello : how to update ? with synaptics or reinstall ?
@+

Offline

#16 2016-10-17 17:03

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: A simple small update notifier

You will need to un-install the old version and then install the new one. I will look into how I can make it upgradeable in the future. Thanks for using it smile

Offline

#17 2016-10-17 17:24

aldrik
Member
From: france
Registered: 2016-04-12
Posts: 65

Re: A simple small update notifier

Thank you, i'll do that
At this time all run ok
@+

Offline

#18 2016-10-17 18:50

JimW
Member
Registered: 2015-12-08
Posts: 400

Re: A simple small update notifier

Ok Dai, I admit I'm not that familiar with .esh removals. How do we go about uninstalling the earlier version?
smile

Offline

#19 2016-10-17 18:56

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: A simple small update notifier

On the menu under Programs you should have an entry for the apt-updater, inside that there will be an option to Uninstall If you have changed your start menu it may not be visible there, in that case you can type from the command line

sh /usr/share/apps/q4os_system/uninst_q4inf/uninstall_apt-updater.esh

and it will run the uninstaller. smile

Offline

#20 2016-10-17 19:01

JimW
Member
Registered: 2015-12-08
Posts: 400

Re: A simple small update notifier

Ok, found it. Thanks. This old brain needs a shove in the correct direction occasionally!
neutral big_smile

Offline

#21 2016-10-17 19:04

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: A simple small update notifier

I know that feeling smile

Offline

#22 2016-10-17 19:31

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,465
Website

Re: A simple small update notifier

JimW wrote:

Ok Dai, I admit I'm not that familiar with .esh removals. How do we go about uninstalling the earlier version?

In addition, you could use the Debian way as well:
$ sudo apt-get autoremove apt-updater

Offline

#23 2016-10-17 21:40

JimW
Member
Registered: 2015-12-08
Posts: 400

Re: A simple small update notifier

Thanks  Q4OS team

I had thought of that, but since I had installed using the.esh file I wasn't sure that it would work. Which is why I asked Dai how to do it.

Hopefully, in the future, I will remember that works too.

Offline

#24 2016-10-17 21:42

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: A simple small update notifier

I overlooked the obvious too smile

Offline

#25 2016-11-04 22:23

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: A simple small update notifier

I've done a little remodelling and the updater now has a permanent icon in the system tray and hovering gives you a little more information. You can now right click the icon to access three new features

1 Check updates Now
    This option simply checks the apt database manually for pending updates.

2 Refresh apt db Now
    This option does the same as "apt-get update" from the command-line.

3. Exit
    Surely I don't need to explain this one big_smile

As always please let me know if there are any issues or if you want me to add functionality to make it do more.

Offline

Board footer

Powered by FluxBB