dpkgsource

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: Apache-2.0, BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package dpkgsource provides a way to annotate packages with repository source information.

Index

Constants

View Source
const (
	// Name of the Annotator
	Name = "misc/dpkg-source"
)

Variables

View Source
var FetchAptCachePolicy = aptCachePolicy

FetchAptCachePolicy to allow for mocking in testing.

Functions

func MapPackageToSource

func MapPackageToSource(ctx context.Context, aptCacheOutput string) (map[string]string, error)

MapPackageToSource parses the output of "apt-cache policy" and returns a map from package names to their repository sources.

func New

func New() annotator.Annotator

New returns a new Annotator.

Types

type Annotator

type Annotator struct{}

Annotator adds repository source context for extracted Debian packages from dpkg extractor.

func (Annotator) Annotate

func (a Annotator) Annotate(ctx context.Context, input *annotator.ScanInput, results *inventory.Inventory) error

Annotate adds repository source context for extracted Debian packages from dpkg extractor.

func (Annotator) Name

func (Annotator) Name() string

Name returns the name of the annotator.

func (Annotator) Requirements

func (Annotator) Requirements() *plugin.Capabilities

Requirements returns the requirements of the annotator.

func (Annotator) Version

func (Annotator) Version() int

Version returns the version of the annotator.

Jump to

Keyboard shortcuts

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