Move "sections" setting into "packages" section.

Rename it to "components", which is the real name for it (see http://manpages.debian.org/cgi-bin/man.cgi?query=sources.list).
This commit is contained in:
Anders Ingemann 2014-05-03 21:57:12 +02:00
parent 03a9667c64
commit b25e607388
3 changed files with 21 additions and 20 deletions

View file

@ -26,10 +26,6 @@
"type": "object", "type": "object",
"properties": { "properties": {
"release": { "enum": ["squeeze", "wheezy", "jessie", "testing", "unstable"] }, "release": { "enum": ["squeeze", "wheezy", "jessie", "testing", "unstable"] },
"sections": {
"type": "array",
"minItems": 1
},
"architecture": { "enum": ["i386", "amd64"] }, "architecture": { "enum": ["i386", "amd64"] },
"bootloader": { "enum": ["pvgrub", "grub", "extlinux"] }, "bootloader": { "enum": ["pvgrub", "grub", "extlinux"] },
"timezone": { "type": "string" }, "timezone": { "type": "string" },
@ -61,6 +57,11 @@
"additionalProperties": false, "additionalProperties": false,
"minItems": 1 "minItems": 1
}, },
"components": {
"type": "array",
"items": {"type": "string"},
"minItems": 1
},
"preferences": { "preferences": {
"type": "object", "type": "object",
"patternProperties": { "patternProperties": {

View file

@ -23,16 +23,16 @@ class AddDefaultSources(Task):
@classmethod @classmethod
def run(cls, info): def run(cls, info):
sections = 'main' components = 'main'
if 'sections' in info.manifest.system: if 'components' in info.manifest.system:
sections = ' '.join(info.manifest.system['sections']) components = ' '.join(info.manifest.system['components'])
info.source_lists.add('main', 'deb {apt_mirror} {system.release} ' + sections) info.source_lists.add('main', 'deb {apt_mirror} {system.release} ' + components)
info.source_lists.add('main', 'deb-src {apt_mirror} {system.release} ' + sections) info.source_lists.add('main', 'deb-src {apt_mirror} {system.release} ' + components)
info.source_lists.add('main', 'deb http://security.debian.org/ {system.release}/updates ' + sections) info.source_lists.add('main', 'deb http://security.debian.org/ {system.release}/updates ' + components)
info.source_lists.add('main', 'deb-src http://security.debian.org/ {system.release}/updates ' + sections) info.source_lists.add('main', 'deb-src http://security.debian.org/ {system.release}/updates ' + components)
if info.manifest.system['release'] not in {'testing', 'unstable'}: if info.manifest.system['release'] not in {'testing', 'unstable'}:
info.source_lists.add('main', 'deb {apt_mirror} {system.release}-updates ' + sections) info.source_lists.add('main', 'deb {apt_mirror} {system.release}-updates ' + components)
info.source_lists.add('main', 'deb-src {apt_mirror} {system.release}-updates ' + sections) info.source_lists.add('main', 'deb-src {apt_mirror} {system.release}-updates ' + components)
class AddManifestPreferences(Task): class AddManifestPreferences(Task):

View file

@ -12,13 +12,13 @@ class SetPackageRepositories(Task):
@classmethod @classmethod
def run(cls, info): def run(cls, info):
sections = 'main' components = 'main'
if 'sections' in info.manifest.system: if 'components' in info.manifest.system:
sections = ' '.join(info.manifest.system['sections']) components = ' '.join(info.manifest.system['components'])
info.source_lists.add('main', 'deb http://http.debian.net/debian {system.release} ' + sections) 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} ' + sections) 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 ' + sections) 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 ' + sections) 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')