forgejo/services/packages
forgejo-backport-action 010366d641 [v13.0/forgejo] fix: package cleaned rule fails if the keep count is too high (#9471)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/9468

If the keep count of a cleanup rule is greater than the number of available packages, it fails with:

```
panic(boundsError{x: int64(x), signed: true, y: y, code: boundsSliceB})
.../packages/packages.go:175
.../routers/web/org/setting_packages.go:108
```

Regression of https://codeberg.org/forgejo/forgejo/pulls/9219/files

Refs https://codeberg.org/forgejo/forgejo/issues/9461

<!--start release-notes-assistant-->

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Bug fixes
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/9468): <!--number 9468 --><!--line 0 --><!--description cGFja2FnZSBjbGVhbmVkIHJ1bGUgZmFpbHMgaWYgdGhlIGtlZXAgY291bnQgaXMgdG9vIGhpZ2g=-->package cleaned rule fails if the keep count is too high<!--description-->
<!--end release-notes-assistant-->

Co-authored-by: Earl Warren <contact@earl-warren.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9471
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2025-09-29 18:01:24 +02:00
..
alpine chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
alt several fixes of ALT Package registry (#8475) 2025-07-10 17:12:07 +02:00
arch chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
cargo chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
cleanup [v13.0/forgejo] fix: package cleaned rule fails if the keep count is too high (#9471) 2025-09-29 18:01:24 +02:00
container Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
debian chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
rpm feat: replace go-rpmutils library with our own (#7953) 2025-05-25 12:30:04 +02:00
auth.go chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
package_update.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
packages.go fix: maven use groupId:artifactId for package name concatenation (#6352) 2025-06-01 09:02:29 +02:00