Merge pull request #1522 from kadler15/issue-1521

[preservefiles] Fix global storage JSON dump
This commit is contained in:
Adriaan de Groot 2020-10-06 21:53:32 +02:00 committed by GitHub
commit faa496be4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 8 deletions

View File

@ -22,7 +22,7 @@ namespace Calamares
/** @brief Storage for data that passes between Calamares modules. /** @brief Storage for data that passes between Calamares modules.
* *
* The Global Storage is global to the Calamars JobQueue and * The Global Storage is global to the Calamares JobQueue and
* everything that depends on that: all of its modules use the * everything that depends on that: all of its modules use the
* same instance of the JobQueue, and so of the Global Storage. * same instance of the JobQueue, and so of the Global Storage.
* *

View File

@ -137,9 +137,9 @@ PreserveFiles::exec()
} }
if ( it.type == ItemType::Config ) if ( it.type == ItemType::Config )
{ {
if ( Calamares::JobQueue::instance()->globalStorage()->saveJson( dest ) ) if ( !Calamares::JobQueue::instance()->globalStorage()->saveJson( dest ) )
{ {
cWarning() << "Could not write config for" << dest; cWarning() << "Could not write a JSON dump of global storage to" << dest;
} }
else else
{ {

View File

@ -33,8 +33,7 @@
# Special values for the key *from* are: # Special values for the key *from* are:
# - *log*, for the complete log file (up to the moment the preservefiles # - *log*, for the complete log file (up to the moment the preservefiles
# module is run), # module is run),
# - *config*, for the Calamares configuration file # - *config*, for a JSON dump of the contents of global storage
# - *globals*, for a JSON dump of the contents of global storage
--- ---
files: files:
- /etc/oem-information - /etc/oem-information
@ -42,7 +41,7 @@ files:
dest: /root/install.log dest: /root/install.log
perm: root:wheel:644 perm: root:wheel:644
- from: config - from: config
dest: /root/install.cfg dest: /root/install.json
perm: root:wheel:400 perm: root:wheel:400
# The *perm* key contains a default value to apply to all files listed # The *perm* key contains a default value to apply to all files listed