mirror of
https://github.com/gogrlx/snack.git
synced 2026-04-02 05:08:42 -07:00
feat(dnf): add dnf5 compatibility
Detect dnf5 at startup via 'dnf --version' output and route to version-specific parsers and command arguments. Key changes: - DNF struct caches v5 detection result - New parse_dnf5.go with parsers for all dnf5 output formats - stripPreamble() removes dnf5 repository loading noise - Command arguments adjusted: --installed, --upgrades, --available - CI matrix expanded with fedora:latest (dnf5) alongside fedora:39 (dnf4) - Full backward compatibility with dnf4 preserved
This commit is contained in:
21
.github/workflows/integration.yml
vendored
21
.github/workflows/integration.yml
vendored
@@ -52,10 +52,25 @@ jobs:
|
||||
- name: Integration tests (snap)
|
||||
run: sudo -E go test -v -tags integration -count=1 ./snap/
|
||||
|
||||
fedora:
|
||||
name: Fedora (dnf)
|
||||
fedora-dnf4:
|
||||
name: Fedora 39 (dnf4)
|
||||
runs-on: ubuntu-latest
|
||||
container: fedora:39 # last release with dnf4; dnf5 (fedora 40+) needs separate parser
|
||||
container: fedora:39
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- name: Setup
|
||||
run: |
|
||||
dnf install -y tree sudo
|
||||
- name: Integration tests
|
||||
run: go test -v -tags integration -count=1 ./dnf/ ./rpm/ ./detect/
|
||||
|
||||
fedora-dnf5:
|
||||
name: Fedora latest (dnf5)
|
||||
runs-on: ubuntu-latest
|
||||
container: fedora:latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
|
||||
Reference in New Issue
Block a user