[packages] Move pacman-options into their own key with subkeys
This commit is contained in:
parent
90459e434f
commit
8a1e5d35fa
@ -397,9 +397,15 @@ class PMPacman(PackageManager):
|
|||||||
self.in_package_changes = False
|
self.in_package_changes = False
|
||||||
self.line_cb = line_cb
|
self.line_cb = line_cb
|
||||||
|
|
||||||
self.pacman_num_retries = libcalamares.job.configuration.get("pacman_num_retries", 0)
|
pacman = libcalamares.job.configuration.get("pacman", None)
|
||||||
self.pacman_disable_timeout = libcalamares.job.configuration.get("pacman_disable_download_timeout", False)
|
if pacman is None:
|
||||||
self.pacman_needed_only = libcalamares.job.configuration.get("pacman_needed_only", False)
|
pacman = dict()
|
||||||
|
if type(pacman) is not dict:
|
||||||
|
libcalamares.utils.warning("Job configuration *pacman* will be ignored.")
|
||||||
|
pacman = dict()
|
||||||
|
self.pacman_num_retries = pacman.get("pacman_num_retries", 0)
|
||||||
|
self.pacman_disable_timeout = pacman.get("pacman_disable_download_timeout", False)
|
||||||
|
self.pacman_needed_only = pacman.get("pacman_needed_only", False)
|
||||||
|
|
||||||
def reset_progress(self):
|
def reset_progress(self):
|
||||||
self.in_package_changes = False
|
self.in_package_changes = False
|
||||||
|
@ -64,19 +64,20 @@ update_system: false
|
|||||||
|
|
||||||
# pacman specific options
|
# pacman specific options
|
||||||
#
|
#
|
||||||
# pacman_num_retries should be a positive integer which sepcifies the
|
# *num_retries* should be a positive integer which specifies the
|
||||||
# number of times the call to pacman will be retried in the event of a
|
# number of times the call to pacman will be retried in the event of a
|
||||||
# failure. If it is missing, it will be set to 0
|
# failure. If it is missing, it will be set to 0.
|
||||||
#
|
#
|
||||||
# pacman_disable_download_timeout is a boolean that, when true, includes
|
# *disable_download_timeout* is a boolean that, when true, includes
|
||||||
# the flag --disable-download-timeout on calls to pacman. When missing,
|
# the flag --disable-download-timeout on calls to pacman. When missing,
|
||||||
# false is assumed
|
# false is assumed.
|
||||||
#
|
#
|
||||||
# pacman_needed_only is a boolean that includes the pacman argument --needed
|
# *needed_only* is a boolean that includes the pacman argument --needed
|
||||||
# when set to true. If missing, false is assumed
|
# when set to true. If missing, false is assumed.
|
||||||
pacman_num_retries: 0
|
pacman:
|
||||||
pacman_disable_download_timeout: false
|
num_retries: 0
|
||||||
pacman_needed_only: false
|
disable_download_timeout: false
|
||||||
|
needed_only: false
|
||||||
|
|
||||||
#
|
#
|
||||||
# List of maps with package operations such as install or remove.
|
# List of maps with package operations such as install or remove.
|
||||||
|
@ -26,9 +26,13 @@ properties:
|
|||||||
update_system: { type: boolean, default: false }
|
update_system: { type: boolean, default: false }
|
||||||
skip_if_no_internet: { type: boolean, default: false }
|
skip_if_no_internet: { type: boolean, default: false }
|
||||||
|
|
||||||
pacman_num_retries: { type: integer, default: 0 }
|
pacman:
|
||||||
pacman_disable_download_timeout: { type: boolean, default: false }
|
additionalProperties: false
|
||||||
pacman_needed_only: { type: boolean, default: false }
|
type: object
|
||||||
|
properties:
|
||||||
|
num_retries: { type: integer, default: 0 }
|
||||||
|
disable_download_timeout: { type: boolean, default: false }
|
||||||
|
needed_only: { type: boolean, default: false }
|
||||||
|
|
||||||
operations:
|
operations:
|
||||||
type: array
|
type: array
|
||||||
|
Loading…
Reference in New Issue
Block a user