Merge ~mwhudson/curtin:v2-make_dname into curtin:master

Proposed by Michael Hudson-Doyle
Status: Merged
Approved by: Michael Hudson-Doyle
Approved revision: 88c7b5b38f479916fe9340fa359a4adaba814c21
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~mwhudson/curtin:v2-make_dname
Merge into: curtin:master
Diff against target: 25 lines (+7/-0)
1 file modified
curtin/commands/block_meta_v2.py (+7/-0)
Reviewer Review Type Date Requested Status
Dan Bungert Approve
Server Team CI bot continuous-integration Approve
Review via email: mp+416633@code.launchpad.net

Commit message

block_meta_v2: call make_dname when required

Description of the change

Yet another thing found by v2 vmtests.

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Dan Bungert (dbungert) wrote :

This looks fine but sounds worthy of a test.

Revision history for this message
Dan Bungert (dbungert) wrote :

oh wait vmtests found it

review: Approve
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Yes indeed.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/curtin/commands/block_meta_v2.py b/curtin/commands/block_meta_v2.py
2index 26f5e6a..051649b 100644
3--- a/curtin/commands/block_meta_v2.py
4+++ b/curtin/commands/block_meta_v2.py
5@@ -8,6 +8,7 @@ from curtin import (block, util)
6 from curtin.commands.block_meta import (
7 disk_handler as disk_handler_v1,
8 get_path_to_storage_volume,
9+ make_dname,
10 partition_handler as partition_handler_v1,
11 partition_verify_sfdisk,
12 )
13@@ -280,6 +281,12 @@ def disk_handler_v2(info, storage_config, handlers):
14 if mode is not None:
15 block.wipe_volume(block.kname_to_path(kname), mode)
16
17+ # Make the names if needed
18+ if 'name' in info:
19+ for action in part_actions:
20+ if action.get('flag') != 'extended':
21+ make_dname(action['id'], storage_config)
22+
23
24 def partition_handler_v2(info, storage_config, handlers):
25 pass

Subscribers

People subscribed via source and target branches