clickdeb

package
v0.0.0-...-7d129bf Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2015 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrSnapInvalidContent is returned if a snap package contains
	// invalid content
	ErrSnapInvalidContent = errors.New("snap contains invalid content")
)

Functions

This section is empty.

Types

type ClickDeb

type ClickDeb struct {
	// contains filtered or unexported fields
}

ClickDeb provides support for the "click" containers (a special kind of deb package)

func Create

func Create(path string) (*ClickDeb, error)

Create calls os.Create and uses that file for the backing file.

func Open

func Open(path string) (*ClickDeb, error)

Open calls os.Open and uses that file for the backing file.

func (*ClickDeb) Build

func (d *ClickDeb) Build(sourceDir string, dataTarFinishedCallback func(dataName string) error) error

Build takes a build debian directory with DEBIAN/ dir and creates a clickdeb from it

func (*ClickDeb) Close

func (d *ClickDeb) Close() error

Close closes the backing file

func (*ClickDeb) ControlMember

func (d *ClickDeb) ControlMember(controlMember string) (content []byte, err error)

ControlMember returns the content of the given control member file (e.g. the content of the "manifest" file in the control.tar.gz ar member)

func (*ClickDeb) MetaMember

func (d *ClickDeb) MetaMember(metaMember string) (content []byte, err error)

MetaMember returns the content of the given meta file (e.g. the content of the "package.yaml" file) from the data.tar.gz ar member's meta/ directory

func (*ClickDeb) Name

func (d *ClickDeb) Name() string

Name returns the Name of the backing file

func (*ClickDeb) Unpack

func (d *ClickDeb) Unpack(targetDir string) error

Unpack unpacks the data.tar.{gz,bz2,xz} into the given target directory with click specific verification, i.e. no files will be extracted outside of the targetdir (no ".." inside the data.tar is allowed)

Jump to

Keyboard shortcuts

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