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
/*
* 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/>.
*/
//! Thread-safe tracking of librpm's process-global configuration state.
//!
//! librpm's `rpmReadConfigFiles` / `rpmInitCrypto` must only be called once
//! per process. This module tracks whether that has happened and serializes
//! macro operations that mutate the global macro context.
use ;
static CONFIG_STATE: = new;
/// Tracking struct for process-global configuration in RPM
pub