← Back to team overview

yellow team mailing list archive

Re: lp:~bac/charms/oneiric/buildbot-slave/fix-apt-sources into lp:~yellow/charms/oneiric/buildbot-slave/trunk

 

On Thu, Apr 5, 2012 at 1:18 PM, Brad Crittenden <bac@xxxxxxxxxxxxx> wrote:
> Brad Crittenden has proposed merging lp:~bac/charms/oneiric/buildbot-slave/fix-apt-sources into lp:~yellow/charms/oneiric/buildbot-slave/trunk.

>  def install_packages():
> +    try:
> +        # Attempt exercising 'apt-get' to see if there are errors in the
> +        # repositories, as frequently seen on EC2.  If so, fix the apt sources
> +        # file.  This approach will work if the failure is seen initially but
> +        # will not succeed if it is intermittent.
> +        run('apt-get', 'update')
> +    except subprocess.CalledProcessError as e:
> +        log("Error running 'apt-get update':")
> +        log(str(e))
> +        log("Proceeding with re-written /etc/apt/sources.list")
> +        fix_apt_sources()
> +        run('apt-get', 'update')
>     install_extra_repository('ppa:yellow/ppa')
>     apt_get_install('python-shelltoolbox')

Since "apt-get update" returns a specific exit code (100) shouldn't we
only rewrite sources.list if it fails with that result?
-- 
Benji York

https://code.launchpad.net/~bac/charms/oneiric/buildbot-slave/fix-apt-sources/+merge/101007
Your team Launchpad Yellow Squad is subscribed to branch lp:~yellow/charms/oneiric/buildbot-slave/trunk.


References