osbuild/mkdir: rename Path struct to MkdirStagePath
The plain `Path` name was a bit unfortunate, since it was specific to the `mkdir` stage, but it was used outside of the `osbuild` package as `osbuild.Path` which was making a wrong impression of it being a generic path structure. This is not true. Rename the structure to contain the stage name. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
64dc942001
commit
30c3ea791e
5 changed files with 6 additions and 6 deletions
|
|
@ -92,7 +92,7 @@ func (p *CoreOSISOTree) serialize() osbuild.Pipeline {
|
||||||
}
|
}
|
||||||
|
|
||||||
pipeline.AddStage(osbuild.NewMkdirStage(&osbuild.MkdirStageOptions{
|
pipeline.AddStage(osbuild.NewMkdirStage(&osbuild.MkdirStageOptions{
|
||||||
Paths: []osbuild.Path{
|
Paths: []osbuild.MkdirStagePath{
|
||||||
{
|
{
|
||||||
Path: "images",
|
Path: "images",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ func (p *OSTreeDeployment) serialize() osbuild.Pipeline {
|
||||||
},
|
},
|
||||||
))
|
))
|
||||||
pipeline.AddStage(osbuild.NewMkdirStage(&osbuild.MkdirStageOptions{
|
pipeline.AddStage(osbuild.NewMkdirStage(&osbuild.MkdirStageOptions{
|
||||||
Paths: []osbuild.Path{
|
Paths: []osbuild.MkdirStagePath{
|
||||||
{
|
{
|
||||||
Path: "/boot/efi",
|
Path: "/boot/efi",
|
||||||
Mode: os.FileMode(0700),
|
Mode: os.FileMode(0700),
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ func (p *ISORootfsImg) serialize() osbuild.Pipeline {
|
||||||
pipeline := p.Base.serialize()
|
pipeline := p.Base.serialize()
|
||||||
|
|
||||||
pipeline.AddStage(osbuild.NewMkdirStage(&osbuild.MkdirStageOptions{
|
pipeline.AddStage(osbuild.NewMkdirStage(&osbuild.MkdirStageOptions{
|
||||||
Paths: []osbuild.Path{
|
Paths: []osbuild.MkdirStagePath{
|
||||||
{
|
{
|
||||||
Path: "LiveOS",
|
Path: "LiveOS",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ func (p *AnacondaISOTree) serialize() osbuild.Pipeline {
|
||||||
}
|
}
|
||||||
|
|
||||||
pipeline.AddStage(osbuild.NewMkdirStage(&osbuild.MkdirStageOptions{
|
pipeline.AddStage(osbuild.NewMkdirStage(&osbuild.MkdirStageOptions{
|
||||||
Paths: []osbuild.Path{
|
Paths: []osbuild.MkdirStagePath{
|
||||||
{
|
{
|
||||||
Path: "images",
|
Path: "images",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@ import "os"
|
||||||
|
|
||||||
// Options for the org.osbuild.ostree.config stage.
|
// Options for the org.osbuild.ostree.config stage.
|
||||||
type MkdirStageOptions struct {
|
type MkdirStageOptions struct {
|
||||||
Paths []Path `json:"paths"`
|
Paths []MkdirStagePath `json:"paths"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Path struct {
|
type MkdirStagePath struct {
|
||||||
Path string `json:"path"`
|
Path string `json:"path"`
|
||||||
|
|
||||||
Mode os.FileMode `json:"mode,omitempty"`
|
Mode os.FileMode `json:"mode,omitempty"`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue