Update Go code to remove Red Hat dependencies and use Debian equivalents
Some checks failed
Tests / test (1.21.x) (push) Failing after 1s
Tests / test (1.22.x) (push) Failing after 1s

This commit is contained in:
robojerk 2025-08-11 09:39:18 -07:00
parent 59ffbbc4d0
commit be2b81ca6d
11 changed files with 149 additions and 164 deletions

View file

@ -1,4 +1,4 @@
package main
package debianpatch
import (
"encoding/json"

View file

@ -0,0 +1,41 @@
package debianpatch
// DebianRepoConfig represents a Debian repository configuration
type DebianRepoConfig struct {
Name string `json:"name"`
BaseURLs []string `json:"baseurls"`
Enabled bool `json:"enabled"`
GPGCheck bool `json:"gpgcheck"`
Priority int `json:"priority"`
SSLClientKey string `json:"ssl_client_key,omitempty"`
SSLClientCert string `json:"ssl_client_cert,omitempty"`
SSLCACert string `json:"ssl_ca_cert,omitempty"`
}
// DebianDepsolveResult represents the result of apt dependency resolution
type DebianDepsolveResult struct {
Packages []string `json:"packages"`
Repos []DebianRepoConfig `json:"repos"`
}
// DebianPackage represents a Debian package
type DebianPackage struct {
Name string `json:"name"`
Version string `json:"version"`
Architecture string `json:"architecture"`
Source string `json:"source"`
Size int64 `json:"size"`
Checksum string `json:"checksum"`
}
// DebianRepoConfigSlice is a slice of DebianRepoConfig for compatibility
type DebianRepoConfigSlice []DebianRepoConfig
// DebianDepsolveResultMap is a map of depsolve results for compatibility
type DebianDepsolveResultMap map[string]DebianDepsolveResult
// DebianPackageSet represents a set of Debian packages (equivalent to rpmmd.PackageSet)
type DebianPackageSet struct {
Include []string `json:"include,omitempty"`
Exclude []string `json:"exclude,omitempty"`
}