diff

package
v0.0.0-...-9a1b228 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package diff calculates changes in Debian package lists.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type List

type List struct {
	Version  map[string]string // Version for each package
	Package  map[string]string // Package to source mapping
	Location map[string]string // Pool location of this package
}

A List of packages in a format useful for postprocessing

func NewList

func NewList(r io.Reader) (*List, error)

NewList reads a package list from r

func (*List) Merge

func (l *List) Merge(other *List)

Merge list with other in place. Combined set will be in l then.

type Package

type Package struct {
	Name, Source, Version, Location string
}

Package succintly describes a package

func Changes

func Changes(newer, older *List) (added, removed, updated []*Package)

Changes are returned as list of added, removed and updated packages.

type Update

type Update struct {
	Package string
	Version string
	Related []*Package
}

Update describe an updated Package and updates related to it

func CompressUpdates

func CompressUpdates(changes []*Package) (update []*Update)

CompressUpdates detects updates of the same source package to the same version and considers them related. This is useful for display of changes to the user. e.g an update of 29 packages is actually just 5 different sets of updates, where each has a bunch of related packages compiled from the same source package update.

Jump to

Keyboard shortcuts

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