Page 3 of 5

Re: Script to detect new upgrades graphically on XFCE

Posted: 22. Nov 2009, 19:58
by gapan
damNageHack wrote:It detected here its own available update. 8-)

But when i start the repos version, no icon visible. Tried to start in console, it only hangs without any error.
That's no problem. It does the first check 10 mins after it is run, so it doesn't delay boot.

Re: Script to detect new upgrades graphically on XFCE

Posted: 24. Nov 2009, 03:55
by damNageHack
Just a hint.

Please take a look into /etc/cron.hourly/slapt-get-update. There, you can see that the local repos cache will be updated every hour.

So, the salix-update-notifier script can not be more current than one hour cause it does only (--)simulate an (--)upgrade process. If it wants to be more current (makes no sense in my opinion anyway) it has to do an (--)update call by itself additionally.

Last but not least, i would not recommend changing the interval for checking available updates. Unclear what sense this feature should have ... :roll:

Re: Script to detect new upgrades graphically on XFCE

Posted: 24. Nov 2009, 08:47
by gapan
damNageHack wrote:Just a hint.

Please take a look into /etc/cron.hourly/slapt-get-update. There, you can see that the local repos cache will be updated every hour.
Yes, just the way it is meant to be.
damNageHack wrote:So, the salix-update-notifier script can not be more current than one hour cause it does only (--)simulate an (--)upgrade process. If it wants to be more current (makes no sense in my opinion anyway) it has to do an (--)update call by itself additionally.
So, you really don't mind if you will be prompted for the root password every now and then, just to update the package database. Unless you're already running your system as root of course (you'll have other issues to worry about then).
damNageHack wrote:Last but not least, i would not recommend changing the interval for checking available updates. Unclear what sense this feature should have ... :roll:
Aren't you the one that thought the notification should read "You have spam" instead? What if someone wants to see spam every hour, or maybe once a day?

Re: Script to detect new upgrades graphically on XFCE

Posted: 24. Nov 2009, 08:51
by JRD
gapan wrote: So, you really don't mind if you will be prompted for the root password every now and then, just to update the package database. Unless you're already running your system as root of course (you'll have other issues to worry about then).
One solution is adding the exact command (slapt-get --update) to sudo file without password for users in the group "users" and exec the command with sudo.
Exactly like shutdown.

Re: Script to detect new upgrades graphically on XFCE

Posted: 24. Nov 2009, 08:55
by gapan
JRD wrote:One solution is adding the exact command (slapt-get --update) to sudo file without password for users in the group "users" and exec the command with sudo.
Exactly like shutdown.
So every user should have the right to update the package database? That really doesn't sound good to me.

Re: Script to detect new upgrades graphically on XFCE

Posted: 24. Nov 2009, 09:19
by JRD
Create your own group or specify a user in particular. That was just an example by the way ^_^

Re: Script to detect new upgrades graphically on XFCE

Posted: 24. Nov 2009, 09:26
by gapan
JRD wrote:Create your own group or specify a user in particular. That was just an example by the way ^_^
So, what happens to a slackware user that doesn't have our own "special" version of slapt-get that includes that certain group, or existing salix users for that matter that have no such group and just wants an update notifier (let me remind you that salix groups/users are exactly the same as slackware ones). It's simple as it is, no reason to try to make it more complex and constantly finding workarounds for problems created by complexity.

Re: Script to detect new upgrades graphically on XFCE

Posted: 24. Nov 2009, 10:02
by JRD
I just said this for someone who want to tweak his system, not for making a package for Salix. Sorry if it wasn't clear.

Re: Script to detect new upgrades graphically on XFCE

Posted: 24. Nov 2009, 13:45
by damNageHack
gapan wrote:
damNageHack wrote:Last but not least, i would not recommend changing the interval for checking available updates. Unclear what sense this feature should have ... :roll:
Aren't you the one that thought the notification should read "You have spam" instead? What if someone wants to see spam every hour, or maybe once a day?
Yes, that is exactly the point. My intention was to make clear that the updater can not be more current of state than twice the automated cache update processing interval. That means for the user that wants to change the update interval, it has to consider about two different configuration files in two different folders.

The sudo idea does not sound good for me, either. sudo is somehow a security leak, especially then without password requirement configured. We should not start the "Ubuntu way" ( :shock: ) of doing things, nevertheless Ubuntu asks for user's password, it is cached for a period of time. Setting suid flag for update-process-notifier or using a little daemon script will be the nicer way of doing such a watch job. What if you run on a server, i would not suggest such things, but what if the user likes it?

Re: Script to detect new upgrades graphically on XFCE

Posted: 24. Nov 2009, 14:02
by gapan
damNageHack wrote:Yes, that is exactly the point. My intention was to make clear that the updater can not be more current of state than twice the automated cache update processing interval. That means for the user that wants to change the update interval, it has to consider about two different configuration files in two different folders.
Sorry, but you have not understood how salix-update-notifier works. There are no two different configuration files in two different folders (it's all in the README). slapt-get -u runs every hour using cron. The actual notifier runs every 2h by default, but it can be changed globally or per user using a config file.