summaryrefslogtreecommitdiffstats
path: root/services/packages
diff options
context:
space:
mode:
authorPeter Verraedt <peter.verraedt@gmail.com>2023-07-21 21:41:38 +0200
committerGitHub <noreply@github.com>2023-07-21 19:41:38 +0000
commit48cd82b759bbd1f60bd7a39026fb80159813448d (patch)
tree86b59a0c8542e0e2d756b4e32caae61d5fc7bc22 /services/packages
parent52fb9367734100847249d074e2bc17f2aa91053e (diff)
downloadgitea-48cd82b759bbd1f60bd7a39026fb80159813448d.tar.gz
gitea-48cd82b759bbd1f60bd7a39026fb80159813448d.zip
Fix version in rpm repodata/primary.xml.gz (#26009)
The version listed in rpm repodata should only contain the rpm version (1.0.0) and not the combination of version and release (1.0.0-2). We correct this behaviour in primary.xml.gz, filelists.xml.gz and others.xml.gz. Signed-off-by: Peter Verraedt <peter@verraedt.be>
Diffstat (limited to 'services/packages')
-rw-r--r--services/packages/rpm/repository.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/packages/rpm/repository.go b/services/packages/rpm/repository.go
index fb78e2b113..774613509e 100644
--- a/services/packages/rpm/repository.go
+++ b/services/packages/rpm/repository.go
@@ -378,7 +378,7 @@ func buildPrimary(pv *packages_model.PackageVersion, pfs []*packages_model.Packa
Architecture: pd.FileMetadata.Architecture,
Version: Version{
Epoch: pd.FileMetadata.Epoch,
- Version: pd.Version.Version,
+ Version: pd.FileMetadata.Version,
Release: pd.FileMetadata.Release,
},
Checksum: Checksum{
@@ -466,7 +466,7 @@ func buildFilelists(pv *packages_model.PackageVersion, pfs []*packages_model.Pac
Architecture: pd.FileMetadata.Architecture,
Version: Version{
Epoch: pd.FileMetadata.Epoch,
- Version: pd.Version.Version,
+ Version: pd.FileMetadata.Version,
Release: pd.FileMetadata.Release,
},
Files: pd.FileMetadata.Files,
@@ -513,7 +513,7 @@ func buildOther(pv *packages_model.PackageVersion, pfs []*packages_model.Package
Architecture: pd.FileMetadata.Architecture,
Version: Version{
Epoch: pd.FileMetadata.Epoch,
- Version: pd.Version.Version,
+ Version: pd.FileMetadata.Version,
Release: pd.FileMetadata.Release,
},
Changelogs: pd.FileMetadata.Changelogs,