Skip to content

Commit 97ed2e7

Browse files
fix typo
1 parent ccfda05 commit 97ed2e7

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

custom/conf/app.example.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2624,8 +2624,8 @@ LEVEL = Info
26242624
;LIMIT_SIZE_VAGRANT = -1
26252625
;; Enable RPM re-signing by default. (It will overwrite the old signature ,using v4 format, not compatible with CentOS 6 or older)
26262626
;DEFAULT_RPM_SIGN_ENABLED = false
2627-
;; Keep only the latest version in Arch DB.
2628-
;KEEP_LATEST_VERSION_ARCH = false
2627+
;; Only show the latest version in the Arch index.
2628+
;SHOW_LATEST_VERSION_ARCH = false
26292629

26302630
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
26312631
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

modules/setting/packages.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ var (
4646

4747
DefaultRPMSignEnabled bool
4848

49-
RepoLatestVersionArch bool
49+
ShowLatestVersionArch bool
5050
}{
5151
Enabled: true,
5252
LimitTotalOwnerCount: -1,
@@ -104,7 +104,7 @@ func loadPackagesFrom(rootCfg ConfigProvider) (err error) {
104104
Packages.LimitSizeSwift = mustBytes(sec, "LIMIT_SIZE_SWIFT")
105105
Packages.LimitSizeVagrant = mustBytes(sec, "LIMIT_SIZE_VAGRANT")
106106
Packages.DefaultRPMSignEnabled = sec.Key("DEFAULT_RPM_SIGN_ENABLED").MustBool(false)
107-
Packages.RepoLatestVersionArch = sec.Key("KEEP_LATEST_VERSION_ARCH").MustBool(false)
107+
Packages.ShowLatestVersionArch = sec.Key("SHOW_LATEST_VERSION_ARCH").MustBool(false)
108108
return nil
109109
}
110110

services/packages/arch/repository.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ func buildPackagesIndex(ctx context.Context, ownerID int64, repoVersion *package
246246
return err
247247
}
248248

249-
if setting.Packages.RepoLatestVersionArch {
249+
if setting.Packages.ShowLatestVersionArch {
250250
if old, ok := vpfs[current.Version.PackageID]; ok {
251251
if compareVersions(old.Version.Version, current.Version.Version) == -1 {
252252
vpfs[current.Version.PackageID] = current

tests/integration/api_packages_arch_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ license = MIT`)
302302
}
303303
t.Run("KeepLastVersion", func(t *testing.T) {
304304
defer tests.PrintCurrentTest(t)()
305-
defer test.MockVariableValue(&setting.Packages.RepoLatestVersionArch, true)()
305+
defer test.MockVariableValue(&setting.Packages.ShowLatestVersionArch, true)()
306306
pkgVer1 := createPackage("gz", "gitea-test", "1.0.0", "aarch64")
307307
pkgVer2 := createPackage("gz", "gitea-test", "1.0.1", "aarch64")
308308
req := NewRequestWithBody(t, "PUT", rootURL, bytes.NewReader(pkgVer1)).

0 commit comments

Comments
 (0)