2

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?

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

0

You must log in to answer this question.

Browse other questions tagged .