pkgmgr

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2026 License: Apache-2.0 Imports: 41 Imported by: 1

Documentation

Index

Constants

View Source
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"
)
View Source
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 GetPackageInfo added in v0.7.0

func GetPackageInfo(file string) (string, string, error)

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 PackageInfoReader interface {
	GetVersion(string) (string, error)
	GetName(string) (string, error)
}

type PackageManager

type PackageManager interface {
	InstallUpdates(context.Context, *unversioned.UpdateManifest, bool) (*llb.State, []string, error)
	GetPackageType() string
}

func GetPackageManager

func GetPackageManager(osType string, osVersion string, config *buildkit.Config, workingFolder string) (PackageManager, error)

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

type PackageManagerMetadata interface {
	Annotations() map[string]string
}

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)

type UpdatePackageInfo

type UpdatePackageInfo struct {
	Filename string
	Version  string
}

type VersionComparer

type VersionComparer struct {
	IsValid  func(string) bool
	LessThan func(string, string) bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL