From 8aa8ac2d2688d9723a6e04bdb3d53b7b09e8e9f8 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 3 Jul 2020 21:51:39 +0200 Subject: [PATCH] [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 --- src/modules/packages/packages.conf | 16 ++++---- src/modules/packages/packages.schema.yaml | 50 +++++++++++------------ 2 files changed, 32 insertions(+), 34 deletions(-) diff --git a/src/modules/packages/packages.conf b/src/modules/packages/packages.conf index 032794177..bcf313972 100644 --- a/src/modules/packages/packages.conf +++ b/src/modules/packages/packages.conf @@ -1,16 +1,18 @@ --- # # Which package manager to use, options are: -# - packagekit - PackageKit CLI tool -# - zypp - Zypp RPM frontend -# - yum - Yum RPM frontend -# - dnf - DNF, the new RPM frontend -# - urpmi - Mandriva package manager +# - apk - Alpine Linux package manager # - apt - APT frontend for DEB and RPM +# - dnf - DNF, the new RPM frontend +# - entropy - Sabayon package manager +# - packagekit - PackageKit CLI tool # - pacman - Pacman # - portage - Gentoo package manager -# - entropy - Sabayon package manager -# - apk = Alpine Linux package manager +# - urpmi - Mandriva package manager +# - yum - Yum RPM frontend +# - zypp - Zypp RPM frontend +# +# Not actually a package manager, but suitable for testing: # - dummy - Dummy manager, only logs # backend: dummy diff --git a/src/modules/packages/packages.schema.yaml b/src/modules/packages/packages.schema.yaml index 8b8a9eb1d..24e1a271a 100644 --- a/src/modules/packages/packages.schema.yaml +++ b/src/modules/packages/packages.schema.yaml @@ -4,30 +4,26 @@ $id: https://calamares.io/schemas/packages additionalProperties: false type: object properties: - "backend": { type: string, required: true, enum: [packagekit, zypp, yum, dnf, urpmi, apt, pacman, portage, entropy] } - "update_db": { type: boolean, default: true } - "operations": - type: seq - sequence: - - type: map - mapping: - "install": - type: seq - sequence: - - { type: text } - "remove": - type: seq - sequence: - - { type: text } - "localInstall": - type: seq - sequence: - - { type: text } - "try_install": - type: seq - sequence: - - { type: text } - "try_remove": - type: seq - sequence: - - { type: text } + backend: + type: string + enum: + - apk + - apt + - dnf + - entropy + - packagekit + - pacman + - portage + - urpmi + - yum + - zypp + - dummy + + update_db: { type: boolean, default: true } + update_system: { type: boolean, default: false } + skip_if_no_internet: { type: boolean, default: false } + + operations: + type: array + +required: [ backend ]