Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
If you want it always have a return value of success, why not use apt-get update; true? – Dan D. Nov 21 '12 at 1:59
Uh, right, yes, that would work. Although I'm still curious as to whether apt-get itself provides a mechanism to achieve this. – cbmanica Nov 26 '12 at 22:31

You must log in to answer this question.

Browse other questions tagged .