Is there any way or tool that I can use to receive notifications when any of my macports-packages are out-of-date?

link|improve this question

80% accept rate
feedback

2 Answers

up vote 1 down vote accepted

How about a cron job which runs port outdated and sends email when something is outdated. It could be as simple as this crontab:

MAILTO=Space_C0wb0y@domain.com

0 6 * * * /opt/local/bin/port outdated | /usr/bin/grep -v "No installed ports are outdated."

This will run at 6:00 am everyday. The grep -v removes the "no updates" line if everything is up to date. The MAILTO sets the address that cron will send output to if anything was written to stdout.

link|improve this answer
feedback

My rep is too low to comment on Doug's answer, but don't forget a step to update your repository in the first place! If you don't do that, port outdated can't tell you that anything needs updating, because your installed ports will match your portfiles exactly. However, updating is typically done with sudo port selfupdate. Whether you want to automate scripts with sudo access has pros and cons.

The "proper" way to sync and report on what needs upgrading is:

sudo port selfupdate && port outdated

selfupdate produces a fair amount of output, so I use something like

sudo port sync && port outdated

link|improve this answer
Note that selfupdate would also update your base installation, which is something you probably don't want to happen automatically with a cronjob. – Raim Jun 7 '10 at 18:50
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.