As the summary says, sync'ing via cron fails basically the connection just unexpectantly closes, but works fine manually.
Steps to Reproduce:
I was discussing this with bcowan in IRC. However my problem was with esync (from the esearch package). emerge sync works fine in cron for me.
same issue here, seems rizzo also has same issue...
esync fails as a cronjob, 'emerge sync && eupdatedb' works flawlessly
bcowan, rizzo, and I are also running vixie cron
may be try add 'TERM="linux"' to rsync-gentoo-portage.sh
Also try it without the ...close_stdin.diff patch.
no go on setting the TERM value, I'm not even having any luck from cmd anymore
no luck without close_stdin.diff for esync here either
with rsync-gentoo-portage.sh as is, I did
# crontab -e
*/1 * * * * /opt/gentoo-rsync/rsync-gentoo-portage.sh
it works. change it accordingly, obviously you don't want to sync every minute. BTW, I am also using vcron.
I changed a few things, added compression back, upped the timeout to 800 instead of the 300 someone dropped it back too on the latest release, and called it directly from cron and it seems to be working again for me at the moment.
so is this still an issue?
Forgot all about this. I'll try it again.
It appears it still fails via cron. After all weekend I had no new packages to update on the box that is esync'ing. The box that is 'emerge sync'ing had plenty of new stuff.
After manually esyncing, there were then plenty of packages to emerge. I'm going to try and capture the error text from cron.
Wrapping the esync call in a bash script didn't work either. What do you people have for scripts that have it working?
Looks like this is still an issue. Any chance on giving it some serious TLC? Would be nice to just have esync done overnight.
mybe is the same problem with eix-update... it's an environment problem.
Launching script from crontab results starting them with an empty (or at least not the same of the system) environment.
To resolve this simply write somthing like this
30 1 * * * source /etc/profile; /usr/sbin/eix-sync > /var/log/eix-sync-last
i think can be a good idea set a configuration option containing the environment script to launch before any other script...
*** Bug 134106 has been marked as a duplicate of this bug. ***