rpmdb

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package rpmdb lets pkgdb read rpm sqlite databases (rpmdb.sqlite, rpm 4.16 and later: RHEL 9, Fedora 33+, Amazon Linux 2023, SLES 16). Blank-import it:

import _ "github.com/DefectDojo/earlylight/detectors/php2shell/internal/pkgdb/rpmdb"

It is separate so that importers of pkgdb that never read rpm databases do not link a SQL engine. It only reads rows; header parsing stays in pkgdb.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(main, wal []byte) (recs []pkgdb.RPMRecord, err error)

Read returns every row of the Packages table of an rpm sqlite database. The database (and its write-ahead log, which can hold committed transactions not yet checkpointed into the main file) is copied into a private temporary directory, opened there and removed afterwards; the original is never touched. Any error, including a malformed page anywhere in the table, fails the whole read: a partial package list is never returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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