profilesutil

package
v0.0.0-...-abfb8b1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2016 License: BSD-3-Clause Imports: 12 Imported by: 3

Documentation

Overview

package profilesutil provides utility routines for implementing profiles.

Index

Constants

View Source
const (
	DefaultDirPerm  = os.FileMode(0755)
	DefaultFilePerm = os.FileMode(0644)
)

Variables

This section is empty.

Functions

func AtomicAction

func AtomicAction(jirix *jiri.X, installFn func() error, dir, message string) error

AtomicAction performs an action 'atomically' by keeping track of successfully completed actions in the supplied completion log and re-running them if they are not successfully logged therein after deleting the entire contents of the dir parameter. Consequently it does not make sense to apply AtomicAction to the same directory in sequence.

func Fetch

func Fetch(jirix *jiri.X, dst, url string) error

Fetch downloads the specified url and saves it to dst.

func IsFNLHost

func IsFNLHost() bool

IsFNLHost returns true iff the host machine is running FNL TODO(bprosnitz) We should find a better way to detect that the machine is running FNL TODO(bprosnitz) This is needed in part because fnl is not currently a GOHOSTOS. This should probably be handled by having hosts that are separate from GOHOSTOSs similarly to how targets are defined.

func MissingOSPackages

func MissingOSPackages(jirix *jiri.X, pkgs []string) ([]string, error)

MissingOSPackages returns the subset of the supplied packages that are missing from the underlying operating system and hence will need to be installed.

func OSPackageInstallCommands

func OSPackageInstallCommands(jirix *jiri.X, pkgs []string) [][]string

OSPackagesInstallCommands returns the list of commands required to install the specified packages on the underlying operating system.

func Untar

func Untar(jirix *jiri.X, srcFile, dstDir string) error

Untar untars the file in srcFile and puts resulting files in directory dstDir.

func Unzip

func Unzip(jirix *jiri.X, srcFile, dstDir string) error

Unzip unzips the file in srcFile and puts resulting files in directory dstDir.

func UsingAptitude

func UsingAptitude(jirix *jiri.X) bool

UsingAptitude returns true if the aptitude package manager (debian, ubuntu) is being used by the underlying OS.

func UsingPacman

func UsingPacman(jirix *jiri.X) bool

UsingPacman returns true if the pacman package manager (archlinux) is being used by the underlying OS.

func UsingYum

func UsingYum(jirix *jiri.X) bool

UsingYum returns true if the yum/rpm package manager (redhat) is being used by the underlying OS.

Types

This section is empty.

Jump to

Keyboard shortcuts

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