build: naming cosmetic.

This commit is contained in:
Alexandre Pujol 2025-01-14 23:58:01 +01:00
parent 9953cf1fbd
commit ba067a0214
Failed to generate hash of commit
2 changed files with 4 additions and 4 deletions

View file

@ -101,7 +101,7 @@ func Configure() {
sync, _ := prepare.Tasks["synchronise"].(*prepare.Synchronise)
sync.Paths = []string{file}
overwrite, _ := prepare.Tasks["overwrite"].(*prepare.Overwrite)
overwrite.OneFile = true
overwrite.Optional = true
}
}

View file

@ -15,7 +15,7 @@ const ext = ".apparmor.d"
type Overwrite struct {
prebuild.Base
OneFile bool
Optional bool
}
func init() {
@ -24,7 +24,7 @@ func init() {
Keyword: "overwrite",
Msg: "Overwrite dummy upstream profiles",
},
OneFile: false,
Optional: false,
})
}
@ -46,7 +46,7 @@ func (p Overwrite) Apply() ([]string, error) {
for _, name := range path.MustReadFilteredFileAsLines() {
origin := prebuild.RootApparmord.Join(name)
dest := prebuild.RootApparmord.Join(name + ext)
if !dest.Exist() && p.OneFile {
if !dest.Exist() && p.Optional {
continue
}
if origin.Exist() {