Files
snack/dnf/dnf_other.go
Tai Groot beb4c51219 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
2026-02-26 02:11:27 +00:00

50 lines
1.1 KiB
Go

//go:build !linux
package dnf
import (
"context"
"github.com/gogrlx/snack"
)
func available() bool { return false }
func (d *DNF) detectVersion() {}
func install(_ context.Context, _ []snack.Target, _ ...snack.Option) error {
return snack.ErrUnsupportedPlatform
}
func remove(_ context.Context, _ []snack.Target, _ ...snack.Option) error {
return snack.ErrUnsupportedPlatform
}
func upgrade(_ context.Context, _ ...snack.Option) error {
return snack.ErrUnsupportedPlatform
}
func update(_ context.Context) error {
return snack.ErrUnsupportedPlatform
}
func list(_ context.Context, _ bool) ([]snack.Package, error) {
return nil, snack.ErrUnsupportedPlatform
}
func search(_ context.Context, _ string, _ bool) ([]snack.Package, error) {
return nil, snack.ErrUnsupportedPlatform
}
func info(_ context.Context, _ string, _ bool) (*snack.Package, error) {
return nil, snack.ErrUnsupportedPlatform
}
func isInstalled(_ context.Context, _ string, _ bool) (bool, error) {
return false, snack.ErrUnsupportedPlatform
}
func version(_ context.Context, _ string, _ bool) (string, error) {
return "", snack.ErrUnsupportedPlatform
}