Getting notified when Debian repository updates

As a real Debian unstable addict, for a long time, I wanted to have real time notifications when upstream repository updates. So I can immediately check what's new and, time permitted, do the upgrade right away. Fortunately, I had some spare time few weeks ago that I invested in developing a neat script that you can find attached. This was also an exercise in using the GNOME notification mechanism. It's all quick and dirty, but it gets the job done well.

Let me also say that I know that there are GNOME applets that do the similar task, sitting in the tray and checking for updates. But for many reasons, I wanted my own solution. First of all, I don't like programs taking place in my GNOME panel (or system memory), when there's no pressing need for that. Second, I wanted much faster response. Finally, doing some perl scripting from time to time is good for one's karma.

So, if you have downloaded the script, check the small configuration block at the start, and update it to point at your favorite repository and distribution. I suppose it will be most useful for testing & unstable distributions, but don't hesitate to use it even on stable.

Second thing you might want to change is the time the notification stays on the screen. I deliberately set it to stay on screen for half an hour, because I like it that way. If you'd like a shorter period, change 1800000 (ms) to something smaller (near the end of the script).

Finally, you need to add the appropriate line to your crontab. On my system, it looks like:

*/5 * * * * /usr/local/bin/notify-debian

Meaning, it checks for update every 5 minutes.

And that would be it. If you find it useful, I would appreciate a comment.

AttachmentSize
notify-debian1.39 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

notify

Maybe you can & want to help me.
I'm looking for a console method, a script hack or a package that permit to obtain a list of all the packages from the sid repo that aren't installed on my system and then highlight (maybe through a secondary output) which packages are new added to the repo (new entry, non updated!).
Have you any idea?

Check

Check /var/lib/dpkg/available file. It contains list of all known packages. If you save it's state (possibly parsed to list only package names) and check changes after an apt-get update you'll be able to see which files are new. To see what you already have installed dpkg --get-selections comes useful. And now the rest is in your hands, I mean... scripting ability. But, it sure is a good exercise.