Documentation ¶
Overview ¶
Package bdb provides support for read-only access to an RPM database using the BerkeleyDB "hash" format.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckMagic ¶
CheckMagic looks at bit of the provided Reader to see if it looks like a BerkeleyDB file.
According to the libmagic database I looked at:
# Hash 1.85/1.86 databases store metadata in network byte order. # Btree 1.85/1.86 databases store the metadata in host byte order. # Hash and Btree 2.X and later databases store the metadata in host byte order.
Since this process can't (and doesn't want to) know the endian-ness of the layer's eventual host, we just look both ways for the one type we support.
Types ¶
type PackageDB ¶
type PackageDB struct {
// contains filtered or unexported fields
}
PackageDB is the "pkgdb" a.k.a. "Packages", the raw package data.
func (*PackageDB) AllHeaders ¶
AllHeaders returns ReaderAts for all RPM headers in the PackageDB.
func (*PackageDB) Parse ¶
Parse closes over the provided io.ReaderAt and readies the provided PackageDB.
Click to show internal directories.
Click to hide internal directories.