[packages] Tidy up configuration

- fix the schema so the schema is valid json-schema
- the schema doesn't actually validate the *operations* yet
- sort the named backends (needs a double-check that the
  list covers all the ones we currently support)

SEE #1441
This commit is contained in:
Adriaan de Groot 2020-07-03 21:51:39 +02:00
parent 08aa362c5c
commit 8aa8ac2d26
2 changed files with 32 additions and 34 deletions

View File

@ -1,16 +1,18 @@
--- ---
# #
# Which package manager to use, options are: # Which package manager to use, options are:
# - packagekit - PackageKit CLI tool # - apk - Alpine Linux package manager
# - zypp - Zypp RPM frontend
# - yum - Yum RPM frontend
# - dnf - DNF, the new RPM frontend
# - urpmi - Mandriva package manager
# - apt - APT frontend for DEB and RPM # - apt - APT frontend for DEB and RPM
# - dnf - DNF, the new RPM frontend
# - entropy - Sabayon package manager
# - packagekit - PackageKit CLI tool
# - pacman - Pacman # - pacman - Pacman
# - portage - Gentoo package manager # - portage - Gentoo package manager
# - entropy - Sabayon package manager # - urpmi - Mandriva package manager
# - apk = Alpine Linux package manager # - yum - Yum RPM frontend
# - zypp - Zypp RPM frontend
#
# Not actually a package manager, but suitable for testing:
# - dummy - Dummy manager, only logs # - dummy - Dummy manager, only logs
# #
backend: dummy backend: dummy

View File

@ -4,30 +4,26 @@ $id: https://calamares.io/schemas/packages
additionalProperties: false additionalProperties: false
type: object type: object
properties: properties:
"backend": { type: string, required: true, enum: [packagekit, zypp, yum, dnf, urpmi, apt, pacman, portage, entropy] } backend:
"update_db": { type: boolean, default: true } type: string
"operations": enum:
type: seq - apk
sequence: - apt
- type: map - dnf
mapping: - entropy
"install": - packagekit
type: seq - pacman
sequence: - portage
- { type: text } - urpmi
"remove": - yum
type: seq - zypp
sequence: - dummy
- { type: text }
"localInstall": update_db: { type: boolean, default: true }
type: seq update_system: { type: boolean, default: false }
sequence: skip_if_no_internet: { type: boolean, default: false }
- { type: text }
"try_install": operations:
type: seq type: array
sequence:
- { type: text } required: [ backend ]
"try_remove":
type: seq
sequence:
- { type: text }