pacmandb

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package pacmandb refreshes Arch repository sync databases.

It parses /etc/pacman.conf (with Include + mirrorlist expansion), resolves $repo/$arch placeholders, fetches each <repo>.db file with multi-mirror failover, and writes the result atomically to /var/lib/pacman/sync/.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sync

func Sync(ctx context.Context) (succeeded int, err error)

Sync downloads <repo>.db for every enabled repo in pacman.conf. Returns the number of repos successfully synced and the first error.

Types

type Config

type Config struct {
	Architecture string
	Repos        []Repo
}

Config represents the parsed pacman.conf configuration.

func ParseConfig

func ParseConfig(path string) (*Config, error)

ParseConfig parses /etc/pacman.conf and returns the configuration.

type Repo

type Repo struct {
	Name    string
	Servers []string // Resolved Server = entries (including from Include)
}

Repo represents a pacman repository configuration.

Jump to

Keyboard shortcuts

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