diff options
author | Arnaud Ferraris <arnaud.ferraris@collabora.com> | 2019-02-08 18:11:06 +0100 |
---|---|---|
committer | Arnaud Ferraris <arnaud.ferraris@collabora.com> | 2019-02-08 18:11:06 +0100 |
commit | 91430a3cdbde1b010e8699cdf770a60793e85098 (patch) | |
tree | e73e40cb1d7b412a651db2af59f6fc3d75b16573 | |
parent | 9d316b430f679880a19fcbd5f743ee3d3d021888 (diff) |
[rawfs] Add rawfs source to the `partitions` entry in global storage
When using the `rawfs` module for copying data, it may be useful to
save the source device used for later checks or actions. This commit
therefore adds a `source` field to each corresponding partition entry in
global storage, so that this information can be retrieved later during
the installation process.
Another small improvement is that global storage is now modified only
once (it was previously modified as many times as there were entries
processed by the `rawfs` module).
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
-rw-r--r-- | src/modules/rawfs/main.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/rawfs/main.py b/src/modules/rawfs/main.py index 2ccb03b69..acf901a0c 100644 --- a/src/modules/rawfs/main.py +++ b/src/modules/rawfs/main.py @@ -156,8 +156,10 @@ def update_global_storage(item, gs): libcalamares.utils.debug("Setting {} UUID to {}".format(item.destination, ret.stdout.rstrip())) gs[gs.index(partition)]["uuid"] = ret.stdout.rstrip() - libcalamares.globalstorage.remove("partitions") - libcalamares.globalstorage.insert("partitions", gs) + gs[gs.index(partition)]["source"] = item.source + + libcalamares.globalstorage.remove("partitions") + libcalamares.globalstorage.insert("partitions", gs) def run(): """Raw filesystem copy module""" |