1
I'm working with a system that invokes apt-get update
from a Ruby Capistrano recipe. Capistrano cares (apparently) about the return code of the shell commands it executes. apt-get update
is running into some missing urls (because the mirror I'm pointing to is incomplete), and when it finishes with a failure code, Capistrano stops processing the rest of the recipe. I need apt-get update
to ignore the missing urls and let Capistrano at least try to go on with its life. I would have thought that apt-get --force-yes -y --ignore-missing update
would have done it, but it didn't. Am I missing the right incantation to get apt-get
to do what I want, or am I stuck with either surrounding it with some shell hackery to mask the errors or figuring out why the mirror is incomplete in the first place?
If you want it always have a return value of success, why not use
apt-get update; true
? – Dan D. – 2012-11-21T01:59:26.503Uh, right, yes, that would work. Although I'm still curious as to whether apt-get itself provides a mechanism to achieve this. – cbmanica – 2012-11-26T22:31:27.413