Skip to content

Commit fcf7ef8

Browse files
committed
rpm: make sure constraints are applied before install
This ensures platform is set in the so we can generate a correct cache key for dnf cache mounts. Signed-off-by: Brian Goff <cpuguy83@gmail.com> (cherry picked from commit 17698bf) Signed-off-by: Brian Goff <cpuguy83@gmail.com>
1 parent 5bb7cab commit fcf7ef8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

targets/linux/rpm/distro/container.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ func (cfg *Config) BuildContainer(ctx context.Context, client gwclient.Client, w
6969
}
7070

7171
rootfs = worker.Run(
72+
dalec.WithConstraints(opts...), // Make sure constraints (and platform specifically) are applied before install is set
7273
cfg.Install(pkgs, installOpts...),
7374
llb.AddMount(rpmMountDir, rpmDir, llb.SourcePath("/RPMS")),
7475
llb.AddMount(baseMountPath, basePkgs, llb.SourcePath("/RPMS")),
75-
dalec.WithConstraints(opts...),
7676
).AddMount(workPath, rootfs)
7777

7878
if post := spec.GetImagePost(targetKey); post != nil && len(post.Symlinks) > 0 {

0 commit comments

Comments
 (0)