alpm-db
A library and command line interface for alpm-db structures used in Arch Linux Package Management (ALPM).
Documentation
- https://alpm.archlinux.page/rustdoc/alpm_db/ for development version of the crate.
- https://docs.rs/alpm-db/latest/alpm_db/ for released version of the crate.
Overview
The alpm-db crate provides modules and binaries for working with several components of an alpm-db:
- The
descmodule allows writing and parsing of alpm-db-desc files, which describe the metadata of an installed package. Thealpm-db-descCLI can create, format, and validate these files. - The
filesmodule allows writing and parsing of alpm-db-files files, which provide file listings and information on files considered for backup of an installed package. Thealpm-db-filesCLI can create, format, and validate these files.
Examples
Library
Handle alpm-db-desc files programmatically
Parsing alpm-db-descv1 files:
use FromStr;
use DbDescFileV1;
#
Parsing alpm-db-descv2 files:
use FromStr;
use DbDescFileV2;
#
Handle alpm-db-files files programmatically
use ;
use ;
#
CLI
alpm-db-desc
Create a database desc file from CLI arguments:
The output file ($DBDESC) contains the desc data in alpm-db-descv1 format.
Format db desc data as JSON:
The output file ($DBDESC_JSON) contains the structured JSON representation of
the parsed desc data.
alpm-db-files
# Create an alpm-db-files file from an input directory.
# Format an alpm-db-files file as JSON.
# Validate an alpm-db-files file.
Features
cli: adds dependencies required for thealpm-db-descandalpm-db-filescommand line interfaces._winnow-debug: enables thewinnow/debugfeature for step-by-step parser debugging.
Contributing
Please refer to the contribution guidelines to learn how to contribute to this project.
License
This project can be used under the terms of the Apache-2.0 or MIT. Contributions to this project, unless noted otherwise, are automatically licensed under the terms of both of those licenses.