From c83a05f114825f9b4d6341316f86cc13c2e4c4c6 Mon Sep 17 00:00:00 2001
From: KN4CK3R <admin@oldschoolhack.me>
Date: Mon, 10 Oct 2022 14:46:09 +0200
Subject: [PATCH] Set SemverCompatible to false for Conan packages (#21275)
 (#21366)

Backport of #21275
---
 integrations/api_packages_conan_test.go | 2 +-
 routers/api/packages/conan/conan.go     | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/integrations/api_packages_conan_test.go b/integrations/api_packages_conan_test.go
index 65d16801fc..306f3ef26b 100644
--- a/integrations/api_packages_conan_test.go
+++ b/integrations/api_packages_conan_test.go
@@ -266,7 +266,7 @@ func TestPackageConan(t *testing.T) {
 
 				pd, err := packages.GetPackageDescriptor(db.DefaultContext, pvs[0])
 				assert.NoError(t, err)
-				assert.NotNil(t, pd.SemVer)
+				assert.Nil(t, pd.SemVer)
 				assert.Equal(t, name, pd.Package.Name)
 				assert.Equal(t, version1, pd.Version.Version)
 				assert.IsType(t, &conan_module.Metadata{}, pd.Metadata)
diff --git a/routers/api/packages/conan/conan.go b/routers/api/packages/conan/conan.go
index 0a27f18fd1..591fdb978f 100644
--- a/routers/api/packages/conan/conan.go
+++ b/routers/api/packages/conan/conan.go
@@ -342,8 +342,7 @@ func uploadFile(ctx *context.Context, fileFilter stringSet, fileKey string) {
 			Name:        rref.Name,
 			Version:     rref.Version,
 		},
-		SemverCompatible: true,
-		Creator:          ctx.Doer,
+		Creator: ctx.Doer,
 	}
 	pfci := &packages_service.PackageFileCreationInfo{
 		PackageFileInfo: packages_service.PackageFileInfo{