mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00
Add the manifest "include-source-type" key for packages object
It controls whether to include the 'deb-src' lines in image's source.list. Currently they are always included. This patch changes this behavior by not including them by default; the user must set this new config to true in order to include them. This saves a bit of bandwidth in default installations. Also, the use of src packages is not so usual in ordinary installations.
This commit is contained in:
parent
d046c8e1f7
commit
1290694f9a
2 changed files with 8 additions and 3 deletions
|
@ -121,6 +121,7 @@ properties:
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/absolute_path'
|
$ref: '#/definitions/absolute_path'
|
||||||
minItems: 1
|
minItems: 1
|
||||||
|
include-source-type: {type: boolean}
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
plugins:
|
plugins:
|
||||||
type: object
|
type: object
|
||||||
|
|
|
@ -24,14 +24,18 @@ class AddDefaultSources(Task):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
|
include_src = info.manifest.packages.get('include-source-type', False)
|
||||||
components = ' '.join(info.manifest.packages.get('components', ['main']))
|
components = ' '.join(info.manifest.packages.get('components', ['main']))
|
||||||
info.source_lists.add('main', 'deb {apt_mirror} {system.release} ' + components)
|
info.source_lists.add('main', 'deb {apt_mirror} {system.release} ' + components)
|
||||||
info.source_lists.add('main', 'deb-src {apt_mirror} {system.release} ' + components)
|
if include_src:
|
||||||
|
info.source_lists.add('main', 'deb-src {apt_mirror} {system.release} ' + components)
|
||||||
if info.release_codename != 'sid':
|
if info.release_codename != 'sid':
|
||||||
info.source_lists.add('main', 'deb http://security.debian.org/ {system.release}/updates ' + components)
|
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 ' + components)
|
if include_src:
|
||||||
|
info.source_lists.add('main', 'deb-src http://security.debian.org/ {system.release}/updates ' + components)
|
||||||
info.source_lists.add('main', 'deb {apt_mirror} {system.release}-updates ' + components)
|
info.source_lists.add('main', 'deb {apt_mirror} {system.release}-updates ' + components)
|
||||||
info.source_lists.add('main', 'deb-src {apt_mirror} {system.release}-updates ' + components)
|
if include_src:
|
||||||
|
info.source_lists.add('main', 'deb-src {apt_mirror} {system.release}-updates ' + components)
|
||||||
|
|
||||||
|
|
||||||
class AddBackports(Task):
|
class AddBackports(Task):
|
||||||
|
|
Loading…
Add table
Reference in a new issue