diff --git a/frontend/azlinux/handle_rpm.go b/frontend/azlinux/handle_rpm.go index 84a436d6b..7d6da1d4d 100644 --- a/frontend/azlinux/handle_rpm.go +++ b/frontend/azlinux/handle_rpm.go @@ -189,7 +189,7 @@ func installBuildDepsPackage(target string, packageName string, w worker, deps m } } -func installBuildDeps(ctx context.Context, w worker, sOpt dalec.SourceOpts, client gwclient.Client, spec *dalec.Spec, targetKey string, opts ...llb.ConstraintsOpt) (llb.StateOption, error) { +func installBuildDeps(ctx context.Context, w worker, client gwclient.Client, spec *dalec.Spec, targetKey string, opts ...llb.ConstraintsOpt) (llb.StateOption, error) { deps := spec.GetBuildDeps(targetKey) if len(deps) == 0 { return func(in llb.State) llb.State { return in }, nil @@ -230,7 +230,7 @@ func specToRpmLLB(ctx context.Context, w worker, client gwclient.Client, spec *d return llb.Scratch(), err } - installOpt, err := installBuildDeps(ctx, w, sOpt, client, spec, targetKey, opts...) + installOpt, err := installBuildDeps(ctx, w, client, spec, targetKey, opts...) if err != nil { return llb.Scratch(), err } diff --git a/frontend/azlinux/handler.go b/frontend/azlinux/handler.go index fcd9c9f1f..dc2498f7e 100644 --- a/frontend/azlinux/handler.go +++ b/frontend/azlinux/handler.go @@ -83,7 +83,7 @@ func getSpecWorker(ctx context.Context, w worker, client gwclient.Client, sOpt d return llb.Scratch(), errors.New("spec contains go modules but does not have golang in build deps") } - installOpt, err := installBuildDeps(ctx, w, sOpt, client, spec, targetKey, opts...) + installOpt, err := installBuildDeps(ctx, w, client, spec, targetKey, opts...) if err != nil { return llb.Scratch(), err } diff --git a/helpers.go b/helpers.go index 02ba1c231..d0c27386b 100644 --- a/helpers.go +++ b/helpers.go @@ -537,10 +537,9 @@ func GetRepoKeys(worker llb.State, configs []PackageRepositoryConfig, cfg *RepoP mountPath := filepath.Join(cfg.GPGKeyRoot, name) opt := runOptionFunc(func(ei *llb.ExecInfo) { - keySt := gpgKey inPath := filepath.Join("/tmp/in", name) outPath := filepath.Join("/tmp/out", name) - keySt = worker.Run( + keySt := worker.Run( // dearmor key if necessary ShArgs(fmt.Sprintf("cat '%s' | gpg --dearmor --output '%s'", inPath, outPath)), llb.AddMount(inPath, gpgKey, llb.SourcePath(name))).