packages

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package packages is scriptling.provision.package: install and remove system packages, skipping those already as they should be.

Index

Constants

View Source
const (
	LibraryName = "scriptling.provision.package"
	LibraryDesc = "Install and remove system packages with apt, dnf, yum, apk or Homebrew, skipping those already in place"

	StatusCreated   = "created"
	StatusUnchanged = "unchanged"
	StatusRemoved   = "removed"
	StatusAbsent    = "absent"
)

Variables

This section is empty.

Functions

func Register

func Register(registrar interface{ RegisterLibrary(*object.Library) })

Register registers the library with running as root off: it can install packages only when the process is root (or with Homebrew).

func RegisterConfigured

func RegisterConfigured(registrar interface{ RegisterLibrary(*object.Library) }, opts ...Option)

RegisterConfigured registers the library with its options.

Types

type Option

type Option func(*libraryInstance)

Option configures the library.

func WithBecome

func WithBecome(b *become.Become) Option

WithBecome lets the library install packages as root, through b. Package managers that need root use it on their own; Homebrew never does.

Jump to

Keyboard shortcuts

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