Skip to content

Commit 629ff9a

Browse files
committed
Fix incorrect format for deb version constraints
The format it was using is the or operator `|` that says either of these constraints satisfies the dependency. We need these to be be and-ed, which is done like any other package with a `,`. Signed-off-by: Brian Goff <[email protected]> (cherry picked from commit ae886a3) Signed-off-by: Brian Goff <[email protected]>
1 parent 451bbfe commit 629ff9a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packaging/linux/deb/template_control.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func AppendConstraints(deps map[string]dalec.PackageConstraints) []string {
8888
}
8989
}
9090

91-
out[i] = strings.Join(versionConstraints, " | ")
91+
out[i] = strings.Join(versionConstraints, ", ")
9292
}
9393

9494
return out

packaging/linux/deb/template_control_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func TestAppendConstraints(t *testing.T) {
3737
deps: map[string]dalec.PackageConstraints{
3838
"packageA": {Version: []string{">= 1.0", "<< 2.0"}},
3939
},
40-
want: []string{"packageA (<< 2.0) | packageA (>= 1.0)"},
40+
want: []string{"packageA (<< 2.0), packageA (>= 1.0)"},
4141
},
4242
{
4343
name: "single dependency with architecture constraints",
@@ -51,7 +51,7 @@ func TestAppendConstraints(t *testing.T) {
5151
deps: map[string]dalec.PackageConstraints{
5252
"packageA": {Version: []string{">= 1.0", "<< 2.0"}, Arch: []string{"amd64", "arm64"}},
5353
},
54-
want: []string{"packageA (<< 2.0) [amd64 arm64] | packageA (>= 1.0) [amd64 arm64]"},
54+
want: []string{"packageA (<< 2.0) [amd64 arm64], packageA (>= 1.0) [amd64 arm64]"},
5555
},
5656
{
5757
name: "multiple dependencies with constraints",

0 commit comments

Comments
 (0)