poltroon

package module
Version: v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2016 License: MIT Imports: 8 Imported by: 0

README

poltroon

Build Status

Foolishly updates existing packages from AUR (arch linux only)

  1. Runs pacman --query --foreign to find already-installed packages are not in a sync database. Uses the aurweb RPC Interface to see which of those packages have newer versions available.
  2. Asks if the user wants to proceed. Exits if they don't.
  3. Starts a two-stage pipeline.
  4. In the first stage, we download the package and untar it. (default it two workers).
  5. In the second state, we run makepkg -s to build the package files.
  6. At the end, we print out the command the user can run to install the packages.

All the action happens in /tmp/poltroon/ with a sub-directory for each package and a logs directory within that that can be inspected.

Inspired by cower, extending the idea even further.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AurPackage

type AurPackage struct {
	// name of the package
	Name string
	// CurrentVersion is the version of this package currently installed.
	CurrentVersion string
	// NextVersion is the available version of this package
	NextVersion string

	// url to fetch the current snapshot
	SnapshotURL string

	// root of the package directory
	Root string

	// set after a successful make
	PkgPath string
}

AurPackage is a data holder for what we know about a package

func NewAurPackage

func NewAurPackage(root, name, currentVersion, nextVersion, snapshotURL string) *AurPackage

NewAurPackage creates a new AurPackage. The next step is to call PreparePackageDir.

func (*AurPackage) Build

func (a *AurPackage) Build() string

Build return the directory where we should put build files.

func (*AurPackage) Logs

func (a *AurPackage) Logs() string

Logs returns the the directory where we should put log files.

func (*AurPackage) PreparePackageDir

func (a *AurPackage) PreparePackageDir(perm os.FileMode) error

PreparePackageDir creates a package directory we can download to later.

func (*AurPackage) String

func (a *AurPackage) String() string

type UpdateState

type UpdateState struct {
	// Makes gets an entry whenever a make starts or finishes.  It gets closed
	// once they all complete.
	Makes chan string
	// contains filtered or unexported fields
}

UpdateState tracks the state of the update process. Can be consulted to know when we are done, and to get an idea of the progress

func NewUpdateState

func NewUpdateState(pkgCnt int) *UpdateState

NewUpdateState returns a new UpdateState.

func (*UpdateState) Finished

func (u *UpdateState) Finished(name string)

Finished records the fact that we are now done with the named package.

func (*UpdateState) StartMake

func (u *UpdateState) StartMake(name string)

StartMake records the fact that we are now making the named package.

func (*UpdateState) Wait

func (u *UpdateState) Wait()

Wait blocks until all packages are done

Directories

Path Synopsis
Package alpm lets us use libalpm.
Package alpm lets us use libalpm.
Package aur provides an interface to https://aur.archlinux.org/rpc.php
Package aur provides an interface to https://aur.archlinux.org/rpc.php
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL