Merge lp:~bac/charms/oneiric/buildbot-slave/fix-apt-sources into lp:~yellow/charms/oneiric/buildbot-slave/trunk
Proposed by
Brad Crittenden
Status: | Merged |
---|---|
Merged at revision: | 26 |
Proposed branch: | lp:~bac/charms/oneiric/buildbot-slave/fix-apt-sources |
Merge into: | lp:~yellow/charms/oneiric/buildbot-slave/trunk |
Diff against target: |
59 lines (+37/-0) 1 file modified
hooks/install (+37/-0) |
To merge this branch: | bzr merge lp:~bac/charms/oneiric/buildbot-slave/fix-apt-sources |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gary Poster (community) | Approve | ||
Review via email: mp+101007@code.launchpad.net |
Description of the change
Duplicated changes from the buildbot-master to redo /etc/apt/
To post a comment you must log in.
On Thu, Apr 5, 2012 at 1:18 PM, Brad Crittenden <email address hidden> 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(): CalledProcessEr ror as e: sources. list") extra_repositor y('ppa: yellow/ ppa') install( 'python- shelltoolbox' )
> + 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.
> + log("Error running 'apt-get update':")
> + log(str(e))
> + log("Proceeding with re-written /etc/apt/
> + fix_apt_sources()
> + run('apt-get', 'update')
> install_
> apt_get_
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