Remove redundant code from GCE's tasks.apt

GCE's `tasks.apt.SetPackageRepositories` was adding duplicated entries
to apt `info.source_lists`, even ignoring the package mirror specified
on manifest.
This commit is contained in:
Tiago Ilieve 2014-07-12 13:28:46 -03:00
parent cca31b642f
commit 210999ff5d

View file

@ -6,19 +6,12 @@ import os
class SetPackageRepositories(Task): class SetPackageRepositories(Task):
description = 'Adding apt sources' description = 'Adding goog apt source'
phase = phases.preparation phase = phases.preparation
successors = [apt.AddManifestSources] successors = [apt.AddManifestSources]
@classmethod @classmethod
def run(cls, info): def run(cls, info):
components = 'main'
if 'components' in info.manifest.system:
components = ' '.join(info.manifest.system['components'])
info.source_lists.add('main', 'deb http://http.debian.net/debian {system.release} ' + components)
info.source_lists.add('main', 'deb-src http://http.debian.net/debian {system.release} ' + components)
info.source_lists.add('backports', 'deb http://http.debian.net/debian {system.release}-backports ' + components)
info.source_lists.add('backports', 'deb-src http://http.debian.net/debian {system.release}-backports ' + components)
info.source_lists.add('goog', 'deb http://goog-repo.appspot.com/debian pigeon main') info.source_lists.add('goog', 'deb http://goog-repo.appspot.com/debian pigeon main')