stages/sfdisk: use device instead of file
Instead of operating directly on a file, which was previously specified by `filename`, operate on a device. This is more flexible since a file can be accessed via a loop back device; but the inverse is obviously not true, like other devices can not be accessed via a plain file. Therefore, re-factor the stage to use a device and adapt the existing test (`fedora-ostree-image`).
This commit is contained in:
parent
386ff713cc
commit
98133add11
3 changed files with 77 additions and 56 deletions
|
|
@ -840,8 +840,15 @@
|
|||
},
|
||||
{
|
||||
"type": "org.osbuild.sfdisk",
|
||||
"devices": {
|
||||
"device": {
|
||||
"type": "org.osbuild.loopback",
|
||||
"options": {
|
||||
"filename": "disk.img"
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"filename": "disk.img",
|
||||
"uuid": "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
"label": "gpt",
|
||||
"partitions": [
|
||||
|
|
|
|||
|
|
@ -171,8 +171,15 @@
|
|||
},
|
||||
{
|
||||
"type": "org.osbuild.sfdisk",
|
||||
"devices": {
|
||||
"device": {
|
||||
"type": "org.osbuild.loopback",
|
||||
"options": {
|
||||
"filename": "disk.img"
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"filename": "disk.img",
|
||||
"uuid": "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
"label": "gpt",
|
||||
"partitions": [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue