Correct crontab entry for port selfupdate && port upgrade outdated

Peng Yu pengyu.ut at gmail.com
Sat Apr 27 06:10:10 PDT 2013


Hi,

I have the following crontab entry
/tmp$ sudo crontab -l
0 1 * * * sudo nice /opt/local/bin/bash -c "set -v; ((echo '==> port
selfupdate <=='; /opt/local/bin/port selfupdate) && (echo '==> port
upgrade outdated <=='; /opt/local/bin/port upgrade outdated))
>/tmp/portupdate.log 2>&1"

But I always see the following error message.

/tmp$ cat portupdate.log
==> port selfupdate <==
--->  Updating MacPorts base sources using rsync
Error: /opt/local/bin/port: port selfupdate failed: Error
synchronizing MacPorts sources: command execution failed


When I try to run manual port install, I see the following error
message, which can be resolved by run 'sudo killall tclsh'.

Waiting for lock on /opt/local/var/macports/registry/.registry.lock

Does anybody know what is the correct way to set macports update automatically?

-- 
Regards,
Peng


More information about the macports-users mailing list