Documentation
¶
Index ¶
- Constants
- func GetPackageInfo(file string) (string, string, error)
- func GetPackageManagerAnnotations(manager PackageManager) map[string]string
- func GetUniqueLatestUpdates(updates unversioned.UpdatePackages, cmp VersionComparer, ignoreErrors bool) (unversioned.UpdatePackages, error)
- func ValidateOSPackageNames(updates unversioned.UpdatePackages) error
- type PackageInfoReader
- type PackageManager
- type PackageManagerMetadata
- type PackageManagerOptions
- type UpdateMap
- type UpdatePackageInfo
- type VersionComparer
Constants ¶
const ( ChiselReleaseAnnotation = "sh.copa.chisel.release" ChiselVersionAnnotation = "sh.copa.chisel.version" NativeChiselTargetedPatchError = "targeted patching of native Chisel manifests is not supported; omit --report to run a comprehensive Chisel update" NativeChiselManifestPath = "/var/lib/chisel/manifest.wall" )
const ( RPMDBNone rpmDBType = iota RPMDBBerkley RPMDBNative RPMDBSqlLite RPMDBManifests RPMDBMixed RPMDBInvalid // must be the last in the list RPMDBSize = RPMDBInvalid )
Variables ¶
This section is empty.
Functions ¶
func GetPackageManagerAnnotations ¶ added in v0.15.0
func GetPackageManagerAnnotations(manager PackageManager) map[string]string
GetPackageManagerAnnotations returns a defensive copy of annotations exposed by manager. Package managers that do not implement PackageManagerMetadata simply return no annotations.
func GetUniqueLatestUpdates ¶
func GetUniqueLatestUpdates(updates unversioned.UpdatePackages, cmp VersionComparer, ignoreErrors bool) (unversioned.UpdatePackages, error)
func ValidateOSPackageNames ¶ added in v0.14.0
func ValidateOSPackageNames(updates unversioned.UpdatePackages) error
ValidateOSPackageNames validates that all package names in the update list are safe for interpolation into shell commands. Returns an error if any name is invalid.
Types ¶
type PackageInfoReader ¶
type PackageManager ¶
type PackageManager interface {
InstallUpdates(context.Context, *unversioned.UpdateManifest, bool) (*llb.State, []string, error)
GetPackageType() string
}
func GetPackageManager ¶
func GetPackageManagerWithOptions ¶ added in v0.15.0
func GetPackageManagerWithOptions(osType string, osVersion string, config *buildkit.Config, workingFolder string, managerOptions PackageManagerOptions) (PackageManager, error)
GetPackageManagerWithOptions constructs a package manager with optional manager-specific settings while preserving the original constructor for existing callers.
type PackageManagerMetadata ¶ added in v0.15.0
PackageManagerMetadata is an optional interface implemented by package managers that produce OCI annotations while installing updates. Callers must continue to support package managers that do not implement this interface.
type PackageManagerOptions ¶ added in v0.15.0
type PackageManagerOptions struct {
ChiselRelease string
}
PackageManagerOptions contains optional settings used when constructing a package manager.
type UpdateMap ¶
type UpdateMap map[string]*UpdatePackageInfo
func GetValidatedUpdatesMap ¶
func GetValidatedUpdatesMap(updates unversioned.UpdatePackages, cmp VersionComparer, reader PackageInfoReader, stagingPath string) (UpdateMap, error)