Closed tobias-weiss closed 7 years ago
Thanks for reporting this.
The indicator actually does check again after the upgrade command, the problem is not all methods report properly when they are done. Usually they report (return 0) right away, causing the indicator to check for updates again, before the upgrades where applied.
So... I am aware of the issue and I tried to fix it, the only way I found to make the notification go away properly it o choose a "custom" upgrade command, and to have this command be executed by xterm. I'll post a screenshot of this.
Edit: what upgrade method do you choose?
Thank you for swift reply. I am using custom method. Command to update packages was: pkexec apt uprade -y Terminal to use was: sudo gnome-terminal -x -bash -c
I think the double rights elevation was the source of the misbehavior. With the settings you posted the extension runs as desired.
Before the next update I will try to change to terminal to use again to gnome-terminal but without elevating rights.
Tried this with my second machine with custom settings: sudo apt uprade -y gnome-terminal -x -bash -c
After update with this setting the extension does not seem to get the proper return code, in consequence it does not reset the number of available updates.
In short: I have to stick to xterm then.
Exactly, gnome-terminal immediately returns "success" as soon as it opens up, instead of waiting for the process it's executing to finish. I think there is an upstream bug somewhere about this, but I couldn't find it...
@tobias-weiss I implemented a new way of applying the updates. It uses the /usr/bin/gpk-update-viewer
binary. Fortunately it doesn't exit until it applies all the updates, so it will cleanly update the indicator!
If you can, please try it out and let me know how it goes. It depends on the gnome-packagekit package.
sudo apt install gnome-packagekit
to use it!
This is fixed in a new branch I'll merge soon: https://github.com/franglais125/apt-update-indicator/tree/reorganization
This was merged and released! Pending review on extensions.gnome.org.
Thanks!
If would find it useful if as a last step of applied updates repositories are check again after applying updates as the number shown updates should go down to zero when update process is finished. So I have to manually to recheck in order to get rid of the notification.