Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.