From c6a048c9cad0e48f9c237e52d77eef568a846d67 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Sun, 23 Jul 2023 20:36:48 +0100 Subject: [PATCH] build: add FlagDir variable in prebuild code. --- pkg/prebuild/prebuild.go | 2 ++ pkg/prebuild/prepare.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/prebuild/prebuild.go b/pkg/prebuild/prebuild.go index a02c2424..d9e82d2d 100644 --- a/pkg/prebuild/prebuild.go +++ b/pkg/prebuild/prebuild.go @@ -13,11 +13,13 @@ var ( DistDir *paths.Path Root *paths.Path RootApparmord *paths.Path + FlagDir *paths.Path ) func init() { DistDir = paths.New("dists") Root = paths.New(".build") + FlagDir = DistDir.Join("flags") RootApparmord = Root.Join("apparmor.d") Distribution = getSupportedDistribution() } diff --git a/pkg/prebuild/prepare.go b/pkg/prebuild/prepare.go index 5d8c4b02..9803dd5e 100644 --- a/pkg/prebuild/prepare.go +++ b/pkg/prebuild/prepare.go @@ -135,7 +135,7 @@ func Configure() (err error) { // Set flags on some profiles according to manifest defined in `dists/flags/` func SetFlags() error { for _, name := range []string{"main.flags", Distribution + ".flags"} { - path := DistDir.Join("flags", name) + path := FlagDir.Join(name) if !path.Exist() { continue }