1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*
* Copyright (C) RustRPM Developers
*
* Licensed under the Mozilla Public License Version 2.0
* Fedora-License-Identifier: MPLv2.0
* SPDX-2.0-License-Identifier: MPL-2.0
* SPDX-3.0-License-Identifier: MPL-2.0
*
* This is free software.
* For more information on the license, see LICENSE.
* For more information on free software, see <https://www.gnu.org/philosophy/free-sw.en.html>.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <https://mozilla.org/MPL/2.0/>.
*/
//! Rust binding for librpm: the RPM Package Manager library
//!
//! This crate contains idiomatic Rust bindings which aim to expose a safe
//! API to librpm. The low-level unsafe bindings are located in the
//! [librpm-sys] crate, which is automatically generated by bindgen.
//!
//! Call [`init`] (or [`init_with`] for custom configuration) before using
//! the library, then obtain a [`Db`] handle via [`Db::open`] to query the
//! RPM database.
//!
//! [librpm-sys]: https://rustrpm.org/librpm_sys/index.html
use Path;
/// Error types (defined first due to macros)
/// RPM configuration (i.e. rpmrc)
/// Dependency information for RPM packages
/// RPM database access
/// File information for RPM packages
/// Internal functionality not to be exposed outside of this crate
/// Macros are RPM's configuration system
/// RPM packages
/// RPM version parsing and comparison
/// RPM package signing (requires the `sign` feature)
pub use ;
// Re-export types used in public API
pub use RpmErrorKind;
pub use Tag;
pub use TagData;
/// Initialize librpm with default configuration.
///
/// This reads the system rpmrc and sets up the default database path.
/// Can only be called once per process.
/// Initialize librpm with custom configuration.
///
/// Both arguments are optional:
/// - `config_file`: path to an rpmrc file (`None` for the system default)
/// - `db_path`: path to the RPM database (`None` for the default `_dbpath`)
///
/// Can only be called once per process.