summaryrefslogtreecommitdiffstats
path: root/src/pkginfo.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkginfo.rs')
-rw-r--r--src/pkginfo.rs18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/pkginfo.rs b/src/pkginfo.rs
index 7ec8b83..be0aeb6 100644
--- a/src/pkginfo.rs
+++ b/src/pkginfo.rs
@@ -1,17 +1,3 @@
-//! Reading `.PKGINFO` and `.BUILDINFO` out of a package archive (§10.1).
-//!
-//! A `.pkg.tar.zst` is a zstd-compressed tar with two plain-text metadata files
-//! inside it. pacman reads these through libalpm; we do not link libalpm (no
-//! FFI, no C toolchain dependency, §14), so this module parses the tar and the
-//! text directly. That is not a shortcut — the format is a `key = value` file
-//! with repeated keys, and a `.BUILDINFO` `installed =` block of
-//! `name version arch signature` lines. Both are stable and documented, and
-//! parsing them here is roughly eighty lines.
-//!
-//! This is production code, not harness code: the ingest step decides what the
-//! index claims about a package, and what the world snapshot records, by reading
-//! these two files.
-
use std::io::Read;
/// A package's own metadata, as `.PKGINFO` states it.
@@ -97,9 +83,7 @@ pub fn parse_pkginfo(text: &str) -> PkgInfo {
/// Parse the `.BUILDINFO` `installed` block.
///
/// The first entry shares the line with the key — `installed = glibc 2.39-1
-/// x86_64 -` — and the rest are indented under it, so the header line has to be
-/// parsed as well as skipped. Dropping it would silently lose one dependency from
-/// every snapshot, which is exactly the kind of gap that makes staleness lie.
+/// x86_64 -` — so the header line has to be parsed as well as skipped.
pub fn parse_installed(text: &str) -> Vec<Installed> {
let mut out = Vec::new();
let mut in_block = false;