From 80ee0bcc0d1505dcc78c8115f0ab205e292dce7b Mon Sep 17 00:00:00 2001 From: Bas Zalmstra Date: Fri, 7 Jul 2023 14:53:17 +0200 Subject: [PATCH 1/7] chore: rename libsolv crates --- .gitmodules | 2 +- crates/rattler-bin/Cargo.toml | 2 +- crates/rattler-bin/src/commands/create.rs | 4 +- .../Cargo.toml | 6 +- .../build.rs | 0 .../libsolv | 0 .../src/lib.rs | 5508 ++++++++--------- .../Cargo.toml | 6 +- .../src/arena.rs | 0 .../src/conda_util.rs | 0 .../src/id.rs | 234 +- .../src/lib.rs | 0 .../src/mapping.rs | 0 .../src/pool.rs | 0 .../src/problem.rs | 0 .../src/solvable.rs | 0 .../src/solve_jobs.rs | 0 .../src/solver/clause.rs | 0 .../src/solver/decision.rs | 38 +- .../src/solver/decision_map.rs | 0 .../src/solver/decision_tracker.rs | 0 .../src/solver/mod.rs | 0 ...__solver__test__resolve_with_conflict.snap | 0 ...olver__test__unsat_after_backtracking.snap | 0 ...test__unsat_applies_graph_compression.snap | 0 ..._solver__test__unsat_bluesky_conflict.snap | 0 ...lv_rs__solver__test__unsat_constrains.snap | 0 ..._unsat_incompatible_root_requirements.snap | 0 ...lver__test__unsat_locked_and_excluded.snap | 0 ...__test__unsat_missing_top_level_dep_1.snap | 0 ...__test__unsat_missing_top_level_dep_2.snap | 0 ...test__unsat_no_candidates_for_child_1.snap | 0 ...test__unsat_no_candidates_for_child_2.snap | 0 ...__solver__test__unsat_pubgrub_article.snap | 0 .../src/solver/watch_map.rs | 0 .../src/transaction.rs | 0 crates/rattler_solve/Cargo.toml | 9 +- crates/rattler_solve/benches/bench.rs | 6 +- crates/rattler_solve/src/lib.rs | 6 +- .../src/{libsolv_sys => libsolv_c}/input.rs | 0 .../libc_byte_slice.rs | 0 .../src/{libsolv_sys => libsolv_c}/mod.rs | 0 .../src/{libsolv_sys => libsolv_c}/output.rs | 0 .../wrapper/flags.rs | 0 .../wrapper/keys.rs | 0 .../{libsolv_sys => libsolv_c}/wrapper/mod.rs | 2 +- .../wrapper/pool.rs | 0 .../wrapper/queue.rs | 0 .../wrapper/repo.rs | 0 .../wrapper/repodata.rs | 0 .../wrapper/solvable.rs | 0 .../wrapper/solve_goal.rs | 0 .../wrapper/solve_problem.rs | 0 .../wrapper/solver.rs | 0 .../wrapper/transaction.rs | 0 crates/rattler_solve/src/libsolv_rs/input.rs | 2 +- crates/rattler_solve/src/libsolv_rs/mod.rs | 2 +- crates/rattler_solve/src/libsolv_rs/output.rs | 2 +- crates/rattler_solve/tests/backends.rs | 18 +- crates/tools/src/libsolv_bindings.rs | 4 +- 60 files changed, 2926 insertions(+), 2925 deletions(-) rename crates/{libsolv-sys => rattler_libsolv_c}/Cargo.toml (87%) rename crates/{libsolv-sys => rattler_libsolv_c}/build.rs (100%) rename crates/{libsolv-sys => rattler_libsolv_c}/libsolv (100%) rename crates/{libsolv-sys => rattler_libsolv_c}/src/lib.rs (96%) rename crates/{libsolv_rs => rattler_libsolv_rs}/Cargo.toml (85%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/arena.rs (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/conda_util.rs (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/id.rs (95%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/lib.rs (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/mapping.rs (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/pool.rs (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/problem.rs (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/solvable.rs (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/solve_jobs.rs (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/solver/clause.rs (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/solver/decision.rs (96%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/solver/decision_map.rs (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/solver/decision_tracker.rs (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/solver/mod.rs (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/solver/snapshots/libsolv_rs__solver__test__resolve_with_conflict.snap (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/solver/snapshots/libsolv_rs__solver__test__unsat_after_backtracking.snap (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/solver/snapshots/libsolv_rs__solver__test__unsat_applies_graph_compression.snap (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/solver/snapshots/libsolv_rs__solver__test__unsat_bluesky_conflict.snap (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/solver/snapshots/libsolv_rs__solver__test__unsat_constrains.snap (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/solver/snapshots/libsolv_rs__solver__test__unsat_incompatible_root_requirements.snap (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/solver/snapshots/libsolv_rs__solver__test__unsat_locked_and_excluded.snap (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/solver/snapshots/libsolv_rs__solver__test__unsat_missing_top_level_dep_1.snap (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/solver/snapshots/libsolv_rs__solver__test__unsat_missing_top_level_dep_2.snap (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/solver/snapshots/libsolv_rs__solver__test__unsat_no_candidates_for_child_1.snap (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/solver/snapshots/libsolv_rs__solver__test__unsat_no_candidates_for_child_2.snap (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/solver/snapshots/libsolv_rs__solver__test__unsat_pubgrub_article.snap (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/solver/watch_map.rs (100%) rename crates/{libsolv_rs => rattler_libsolv_rs}/src/transaction.rs (100%) rename crates/rattler_solve/src/{libsolv_sys => libsolv_c}/input.rs (100%) rename crates/rattler_solve/src/{libsolv_sys => libsolv_c}/libc_byte_slice.rs (100%) rename crates/rattler_solve/src/{libsolv_sys => libsolv_c}/mod.rs (100%) rename crates/rattler_solve/src/{libsolv_sys => libsolv_c}/output.rs (100%) rename crates/rattler_solve/src/{libsolv_sys => libsolv_c}/wrapper/flags.rs (100%) rename crates/rattler_solve/src/{libsolv_sys => libsolv_c}/wrapper/keys.rs (100%) rename crates/rattler_solve/src/{libsolv_sys => libsolv_c}/wrapper/mod.rs (96%) rename crates/rattler_solve/src/{libsolv_sys => libsolv_c}/wrapper/pool.rs (100%) rename crates/rattler_solve/src/{libsolv_sys => libsolv_c}/wrapper/queue.rs (100%) rename crates/rattler_solve/src/{libsolv_sys => libsolv_c}/wrapper/repo.rs (100%) rename crates/rattler_solve/src/{libsolv_sys => libsolv_c}/wrapper/repodata.rs (100%) rename crates/rattler_solve/src/{libsolv_sys => libsolv_c}/wrapper/solvable.rs (100%) rename crates/rattler_solve/src/{libsolv_sys => libsolv_c}/wrapper/solve_goal.rs (100%) rename crates/rattler_solve/src/{libsolv_sys => libsolv_c}/wrapper/solve_problem.rs (100%) rename crates/rattler_solve/src/{libsolv_sys => libsolv_c}/wrapper/solver.rs (100%) rename crates/rattler_solve/src/{libsolv_sys => libsolv_c}/wrapper/transaction.rs (100%) diff --git a/.gitmodules b/.gitmodules index 97a4eb081..7997960e6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "crates/rattler/libsolv"] - path = crates/libsolv-sys/libsolv + path = crates/rattler_libsolv_c/libsolv url = https://github.com/baszalmstra/libsolv diff --git a/crates/rattler-bin/Cargo.toml b/crates/rattler-bin/Cargo.toml index 4513cf906..92f54848b 100644 --- a/crates/rattler-bin/Cargo.toml +++ b/crates/rattler-bin/Cargo.toml @@ -32,7 +32,7 @@ rattler = { version = "0.5.0", path = "../rattler", default-features = false } rattler_networking = { version = "0.5.0", path = "../rattler_networking", default-features = false } rattler_conda_types = { version = "0.5.0", path = "../rattler_conda_types" } rattler_repodata_gateway = { version = "0.5.0", path = "../rattler_repodata_gateway", features = ["sparse"], default-features = false } -rattler_solve = { version = "0.5.0", path = "../rattler_solve", features = ["libsolv_rs", "libsolv-sys"] } +rattler_solve = { version = "0.5.0", path = "../rattler_solve", features = ["libsolv_rs", "libsolv_c"] } rattler_virtual_packages = { version = "0.5.0", path = "../rattler_virtual_packages" } reqwest = { version = "0.11.18", default-features = false } tokio = { version = "1.28.2", features = ["rt-multi-thread", "macros"] } diff --git a/crates/rattler-bin/src/commands/create.rs b/crates/rattler-bin/src/commands/create.rs index 2afa7f118..17d3bff18 100644 --- a/crates/rattler-bin/src/commands/create.rs +++ b/crates/rattler-bin/src/commands/create.rs @@ -15,7 +15,7 @@ use rattler_repodata_gateway::fetch::{ CacheResult, DownloadProgress, FetchRepoDataError, FetchRepoDataOptions, }; use rattler_repodata_gateway::sparse::SparseRepoData; -use rattler_solve::{libsolv_rs, libsolv_sys, SolverImpl, SolverTask}; +use rattler_solve::{libsolv_rs, libsolv_c, SolverImpl, SolverTask}; use reqwest::{Client, StatusCode}; use std::{ borrow::Cow, @@ -216,7 +216,7 @@ pub async fn create(opt: Opt) -> anyhow::Result<()> { if use_libsolv_rs { libsolv_rs::Solver.solve(solver_task) } else { - libsolv_sys::Solver.solve(solver_task) + libsolv_c::Solver.solve(solver_task) } })?; diff --git a/crates/libsolv-sys/Cargo.toml b/crates/rattler_libsolv_c/Cargo.toml similarity index 87% rename from crates/libsolv-sys/Cargo.toml rename to crates/rattler_libsolv_c/Cargo.toml index 6ab0ca548..1a2e0766a 100644 --- a/crates/libsolv-sys/Cargo.toml +++ b/crates/rattler_libsolv_c/Cargo.toml @@ -1,7 +1,7 @@ [package] -name = "libsolv-sys" -version = "0.1.0" -edition = "2021" +name = "rattler_libsolv_c" +version.workspace = true +edition.workspace = true authors = ["Bas Zalmstra "] description = "Bindings for libsolv" categories.workspace = true diff --git a/crates/libsolv-sys/build.rs b/crates/rattler_libsolv_c/build.rs similarity index 100% rename from crates/libsolv-sys/build.rs rename to crates/rattler_libsolv_c/build.rs diff --git a/crates/libsolv-sys/libsolv b/crates/rattler_libsolv_c/libsolv similarity index 100% rename from crates/libsolv-sys/libsolv rename to crates/rattler_libsolv_c/libsolv diff --git a/crates/libsolv-sys/src/lib.rs b/crates/rattler_libsolv_c/src/lib.rs similarity index 96% rename from crates/libsolv-sys/src/lib.rs rename to crates/rattler_libsolv_c/src/lib.rs index f64111c05..5f9ae5ed7 100644 --- a/crates/libsolv-sys/src/lib.rs +++ b/crates/rattler_libsolv_c/src/lib.rs @@ -1,2754 +1,2754 @@ -//! Generated file, do not edit by hand, see `crate/tools/src` - -#![allow( - non_upper_case_globals, - non_camel_case_types, - non_snake_case, - dead_code, - clippy::upper_case_acronyms -)] - -pub use libc::FILE; - -pub const SOLV_VERSION_0: u32 = 0; -pub const SOLV_VERSION_1: u32 = 1; -pub const SOLV_VERSION_2: u32 = 2; -pub const SOLV_VERSION_3: u32 = 3; -pub const SOLV_VERSION_4: u32 = 4; -pub const SOLV_VERSION_5: u32 = 5; -pub const SOLV_VERSION_6: u32 = 6; -pub const SOLV_VERSION_7: u32 = 7; -pub const SOLV_VERSION_8: u32 = 8; -pub const SOLV_VERSION_9: u32 = 9; -pub const SOLV_FLAG_PREFIX_POOL: u32 = 4; -pub const SOLV_FLAG_SIZE_BYTES: u32 = 8; -pub const SOLV_FLAG_USERDATA: u32 = 16; -pub const SOLV_FLAG_IDARRAYBLOCK: u32 = 32; -pub const DISTTYPE_RPM: u32 = 0; -pub const DISTTYPE_DEB: u32 = 1; -pub const DISTTYPE_ARCH: u32 = 2; -pub const DISTTYPE_HAIKU: u32 = 3; -pub const DISTTYPE_CONDA: u32 = 4; -pub const SOLV_FATAL: u32 = 1; -pub const SOLV_ERROR: u32 = 2; -pub const SOLV_WARN: u32 = 4; -pub const SOLV_DEBUG_STATS: u32 = 8; -pub const SOLV_DEBUG_RULE_CREATION: u32 = 16; -pub const SOLV_DEBUG_PROPAGATE: u32 = 32; -pub const SOLV_DEBUG_ANALYZE: u32 = 64; -pub const SOLV_DEBUG_UNSOLVABLE: u32 = 128; -pub const SOLV_DEBUG_SOLUTIONS: u32 = 256; -pub const SOLV_DEBUG_POLICY: u32 = 512; -pub const SOLV_DEBUG_RESULT: u32 = 1024; -pub const SOLV_DEBUG_JOB: u32 = 2048; -pub const SOLV_DEBUG_SOLVER: u32 = 4096; -pub const SOLV_DEBUG_TRANSACTION: u32 = 8192; -pub const SOLV_DEBUG_WATCHES: u32 = 16384; -pub const SOLV_DEBUG_TO_STDERR: u32 = 1073741824; -pub const POOL_FLAG_PROMOTEEPOCH: u32 = 1; -pub const POOL_FLAG_FORBIDSELFCONFLICTS: u32 = 2; -pub const POOL_FLAG_OBSOLETEUSESPROVIDES: u32 = 3; -pub const POOL_FLAG_IMPLICITOBSOLETEUSESPROVIDES: u32 = 4; -pub const POOL_FLAG_OBSOLETEUSESCOLORS: u32 = 5; -pub const POOL_FLAG_NOINSTALLEDOBSOLETES: u32 = 6; -pub const POOL_FLAG_HAVEDISTEPOCH: u32 = 7; -pub const POOL_FLAG_NOOBSOLETESMULTIVERSION: u32 = 8; -pub const POOL_FLAG_ADDFILEPROVIDESFILTERED: u32 = 9; -pub const POOL_FLAG_IMPLICITOBSOLETEUSESCOLORS: u32 = 10; -pub const POOL_FLAG_NOWHATPROVIDESAUX: u32 = 11; -pub const POOL_FLAG_WHATPROVIDESWITHDISABLED: u32 = 12; -pub const REL_GT: u32 = 1; -pub const REL_EQ: u32 = 2; -pub const REL_LT: u32 = 4; -pub const REL_AND: u32 = 16; -pub const REL_OR: u32 = 17; -pub const REL_WITH: u32 = 18; -pub const REL_NAMESPACE: u32 = 19; -pub const REL_ARCH: u32 = 20; -pub const REL_FILECONFLICT: u32 = 21; -pub const REL_COND: u32 = 22; -pub const REL_COMPAT: u32 = 23; -pub const REL_KIND: u32 = 24; -pub const REL_MULTIARCH: u32 = 25; -pub const REL_ELSE: u32 = 26; -pub const REL_ERROR: u32 = 27; -pub const REL_WITHOUT: u32 = 28; -pub const REL_UNLESS: u32 = 29; -pub const REL_CONDA: u32 = 30; -pub const SEARCH_STRINGMASK: u32 = 15; -pub const SEARCH_STRING: u32 = 1; -pub const SEARCH_STRINGSTART: u32 = 2; -pub const SEARCH_STRINGEND: u32 = 3; -pub const SEARCH_SUBSTRING: u32 = 4; -pub const SEARCH_GLOB: u32 = 5; -pub const SEARCH_REGEX: u32 = 6; -pub const SEARCH_ERROR: u32 = 15; -pub const SEARCH_NOCASE: u32 = 128; -pub const SEARCH_NO_STORAGE_SOLVABLE: u32 = 256; -pub const SEARCH_SUB: u32 = 512; -pub const SEARCH_ARRAYSENTINEL: u32 = 1024; -pub const SEARCH_DISABLED_REPOS: u32 = 2048; -pub const SEARCH_KEEP_TYPE_DELETED: u32 = 4096; -pub const SEARCH_SKIP_KIND: u32 = 65536; -pub const SEARCH_FILES: u32 = 131072; -pub const SEARCH_CHECKSUMS: u32 = 262144; -pub const SEARCH_SUBSCHEMA: u32 = 1073741824; -pub const SEARCH_THISSOLVID: u32 = 2147483648; -pub const SEARCH_COMPLETE_FILELIST: u32 = 0; -pub const SEARCH_NEXT_KEY: u32 = 1; -pub const SEARCH_NEXT_SOLVABLE: u32 = 2; -pub const SEARCH_STOP: u32 = 3; -pub const SEARCH_ENTERSUB: i32 = -1; -pub const SOLVER_TRANSACTION_IGNORE: u32 = 0; -pub const SOLVER_TRANSACTION_ERASE: u32 = 16; -pub const SOLVER_TRANSACTION_REINSTALLED: u32 = 17; -pub const SOLVER_TRANSACTION_DOWNGRADED: u32 = 18; -pub const SOLVER_TRANSACTION_CHANGED: u32 = 19; -pub const SOLVER_TRANSACTION_UPGRADED: u32 = 20; -pub const SOLVER_TRANSACTION_OBSOLETED: u32 = 21; -pub const SOLVER_TRANSACTION_INSTALL: u32 = 32; -pub const SOLVER_TRANSACTION_REINSTALL: u32 = 33; -pub const SOLVER_TRANSACTION_DOWNGRADE: u32 = 34; -pub const SOLVER_TRANSACTION_CHANGE: u32 = 35; -pub const SOLVER_TRANSACTION_UPGRADE: u32 = 36; -pub const SOLVER_TRANSACTION_OBSOLETES: u32 = 37; -pub const SOLVER_TRANSACTION_MULTIINSTALL: u32 = 48; -pub const SOLVER_TRANSACTION_MULTIREINSTALL: u32 = 49; -pub const SOLVER_TRANSACTION_MAXTYPE: u32 = 63; -pub const SOLVER_TRANSACTION_SHOW_ACTIVE: u32 = 1; -pub const SOLVER_TRANSACTION_SHOW_ALL: u32 = 2; -pub const SOLVER_TRANSACTION_SHOW_OBSOLETES: u32 = 4; -pub const SOLVER_TRANSACTION_SHOW_MULTIINSTALL: u32 = 8; -pub const SOLVER_TRANSACTION_CHANGE_IS_REINSTALL: u32 = 16; -pub const SOLVER_TRANSACTION_MERGE_VENDORCHANGES: u32 = 32; -pub const SOLVER_TRANSACTION_MERGE_ARCHCHANGES: u32 = 64; -pub const SOLVER_TRANSACTION_RPM_ONLY: u32 = 128; -pub const SOLVER_TRANSACTION_KEEP_PSEUDO: u32 = 256; -pub const SOLVER_TRANSACTION_OBSOLETE_IS_UPGRADE: u32 = 512; -pub const SOLVER_TRANSACTION_ARCHCHANGE: u32 = 256; -pub const SOLVER_TRANSACTION_VENDORCHANGE: u32 = 257; -pub const SOLVER_TRANSACTION_KEEP_ORDERDATA: u32 = 1; -pub const SOLVER_TRANSACTION_KEEP_ORDERCYCLES: u32 = 2; -pub const SOLVER_TRANSACTION_KEEP_ORDEREDGES: u32 = 4; -pub const SOLVER_ORDERCYCLE_HARMLESS: u32 = 0; -pub const SOLVER_ORDERCYCLE_NORMAL: u32 = 1; -pub const SOLVER_ORDERCYCLE_CRITICAL: u32 = 2; -pub const SOLVER_RULE_TYPEMASK: u32 = 65280; -pub const SOLVER_SOLUTION_JOB: u32 = 0; -pub const SOLVER_SOLUTION_DISTUPGRADE: i32 = -1; -pub const SOLVER_SOLUTION_INFARCH: i32 = -2; -pub const SOLVER_SOLUTION_BEST: i32 = -3; -pub const SOLVER_SOLUTION_POOLJOB: i32 = -4; -pub const SOLVER_SOLUTION_BLACK: i32 = -5; -pub const SOLVER_SOLUTION_STRICTREPOPRIORITY: i32 = -6; -pub const SOLVER_SOLVABLE: u32 = 1; -pub const SOLVER_SOLVABLE_NAME: u32 = 2; -pub const SOLVER_SOLVABLE_PROVIDES: u32 = 3; -pub const SOLVER_SOLVABLE_ONE_OF: u32 = 4; -pub const SOLVER_SOLVABLE_REPO: u32 = 5; -pub const SOLVER_SOLVABLE_ALL: u32 = 6; -pub const SOLVER_SELECTMASK: u32 = 255; -pub const SOLVER_NOOP: u32 = 0; -pub const SOLVER_INSTALL: u32 = 256; -pub const SOLVER_ERASE: u32 = 512; -pub const SOLVER_UPDATE: u32 = 768; -pub const SOLVER_WEAKENDEPS: u32 = 1024; -pub const SOLVER_MULTIVERSION: u32 = 1280; -pub const SOLVER_LOCK: u32 = 1536; -pub const SOLVER_DISTUPGRADE: u32 = 1792; -pub const SOLVER_VERIFY: u32 = 2048; -pub const SOLVER_DROP_ORPHANED: u32 = 2304; -pub const SOLVER_USERINSTALLED: u32 = 2560; -pub const SOLVER_ALLOWUNINSTALL: u32 = 2816; -pub const SOLVER_FAVOR: u32 = 3072; -pub const SOLVER_DISFAVOR: u32 = 3328; -pub const SOLVER_BLACKLIST: u32 = 3584; -pub const SOLVER_EXCLUDEFROMWEAK: u32 = 4096; -pub const SOLVER_JOBMASK: u32 = 65280; -pub const SOLVER_WEAK: u32 = 65536; -pub const SOLVER_ESSENTIAL: u32 = 131072; -pub const SOLVER_CLEANDEPS: u32 = 262144; -pub const SOLVER_ORUPDATE: u32 = 524288; -pub const SOLVER_FORCEBEST: u32 = 1048576; -pub const SOLVER_TARGETED: u32 = 2097152; -pub const SOLVER_NOTBYUSER: u32 = 4194304; -pub const SOLVER_SETEV: u32 = 16777216; -pub const SOLVER_SETEVR: u32 = 33554432; -pub const SOLVER_SETARCH: u32 = 67108864; -pub const SOLVER_SETVENDOR: u32 = 134217728; -pub const SOLVER_SETREPO: u32 = 268435456; -pub const SOLVER_NOAUTOSET: u32 = 536870912; -pub const SOLVER_SETNAME: u32 = 1073741824; -pub const SOLVER_SETMASK: u32 = 2130706432; -pub const SOLVER_NOOBSOLETES: u32 = 1280; -pub const SOLVER_REASON_UNRELATED: u32 = 0; -pub const SOLVER_REASON_UNIT_RULE: u32 = 1; -pub const SOLVER_REASON_KEEP_INSTALLED: u32 = 2; -pub const SOLVER_REASON_RESOLVE_JOB: u32 = 3; -pub const SOLVER_REASON_UPDATE_INSTALLED: u32 = 4; -pub const SOLVER_REASON_CLEANDEPS_ERASE: u32 = 5; -pub const SOLVER_REASON_RESOLVE: u32 = 6; -pub const SOLVER_REASON_WEAKDEP: u32 = 7; -pub const SOLVER_REASON_RESOLVE_ORPHAN: u32 = 8; -pub const SOLVER_REASON_RECOMMENDED: u32 = 16; -pub const SOLVER_REASON_SUPPLEMENTED: u32 = 17; -pub const SOLVER_FLAG_ALLOW_DOWNGRADE: u32 = 1; -pub const SOLVER_FLAG_ALLOW_ARCHCHANGE: u32 = 2; -pub const SOLVER_FLAG_ALLOW_VENDORCHANGE: u32 = 3; -pub const SOLVER_FLAG_ALLOW_UNINSTALL: u32 = 4; -pub const SOLVER_FLAG_NO_UPDATEPROVIDE: u32 = 5; -pub const SOLVER_FLAG_SPLITPROVIDES: u32 = 6; -pub const SOLVER_FLAG_IGNORE_RECOMMENDED: u32 = 7; -pub const SOLVER_FLAG_ADD_ALREADY_RECOMMENDED: u32 = 8; -pub const SOLVER_FLAG_NO_INFARCHCHECK: u32 = 9; -pub const SOLVER_FLAG_ALLOW_NAMECHANGE: u32 = 10; -pub const SOLVER_FLAG_KEEP_EXPLICIT_OBSOLETES: u32 = 11; -pub const SOLVER_FLAG_BEST_OBEY_POLICY: u32 = 12; -pub const SOLVER_FLAG_NO_AUTOTARGET: u32 = 13; -pub const SOLVER_FLAG_DUP_ALLOW_DOWNGRADE: u32 = 14; -pub const SOLVER_FLAG_DUP_ALLOW_ARCHCHANGE: u32 = 15; -pub const SOLVER_FLAG_DUP_ALLOW_VENDORCHANGE: u32 = 16; -pub const SOLVER_FLAG_DUP_ALLOW_NAMECHANGE: u32 = 17; -pub const SOLVER_FLAG_KEEP_ORPHANS: u32 = 18; -pub const SOLVER_FLAG_BREAK_ORPHANS: u32 = 19; -pub const SOLVER_FLAG_FOCUS_INSTALLED: u32 = 20; -pub const SOLVER_FLAG_YUM_OBSOLETES: u32 = 21; -pub const SOLVER_FLAG_NEED_UPDATEPROVIDE: u32 = 22; -pub const SOLVER_FLAG_URPM_REORDER: u32 = 23; -pub const SOLVER_FLAG_FOCUS_BEST: u32 = 24; -pub const SOLVER_FLAG_STRONG_RECOMMENDS: u32 = 25; -pub const SOLVER_FLAG_INSTALL_ALSO_UPDATES: u32 = 26; -pub const SOLVER_FLAG_ONLY_NAMESPACE_RECOMMENDED: u32 = 27; -pub const SOLVER_FLAG_STRICT_REPO_PRIORITY: u32 = 28; -pub const SOLVER_ALTERNATIVE_TYPE_RULE: u32 = 1; -pub const SOLVER_ALTERNATIVE_TYPE_RECOMMENDS: u32 = 2; -pub const SOLVER_ALTERNATIVE_TYPE_SUGGESTS: u32 = 3; -pub const SELECTION_NAME: u32 = 1; -pub const SELECTION_PROVIDES: u32 = 2; -pub const SELECTION_FILELIST: u32 = 4; -pub const SELECTION_CANON: u32 = 8; -pub const SELECTION_DOTARCH: u32 = 16; -pub const SELECTION_REL: u32 = 32; -pub const SELECTION_GLOB: u32 = 512; -pub const SELECTION_NOCASE: u32 = 2048; -pub const SELECTION_FLAT: u32 = 1024; -pub const SELECTION_SKIP_KIND: u32 = 16384; -pub const SELECTION_MATCH_DEPSTR: u32 = 32768; -pub const SELECTION_INSTALLED_ONLY: u32 = 256; -pub const SELECTION_SOURCE_ONLY: u32 = 4096; -pub const SELECTION_WITH_SOURCE: u32 = 8192; -pub const SELECTION_WITH_DISABLED: u32 = 65536; -pub const SELECTION_WITH_BADARCH: u32 = 131072; -pub const SELECTION_WITH_ALL: u32 = 204800; -pub const SELECTION_REPLACE: u32 = 0; -pub const SELECTION_ADD: u32 = 268435456; -pub const SELECTION_SUBTRACT: u32 = 536870912; -pub const SELECTION_FILTER: u32 = 805306368; -pub const SELECTION_FILTER_KEEP_IFEMPTY: u32 = 1073741824; -pub const SELECTION_FILTER_SWAPPED: u32 = 2147483648; -pub const SELECTION_MODEBITS: u32 = 805306368; -pub const SOLV_ADD_NO_STUBS: u32 = 256; -pub const CONDA_ADD_USE_ONLY_TAR_BZ2: u32 = 256; -pub const CONDA_ADD_WITH_SIGNATUREDATA: u32 = 512; -pub type Stringpool = s_Stringpool; -pub type Pool = s_Pool; -pub type Id = libc::c_int; -pub type Offset = libc::c_uint; -pub type Hashval = libc::c_uint; -pub type Hashtable = *mut Id; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct s_Reldep { - pub name: Id, - pub evr: Id, - pub flags: libc::c_int, -} -pub type Reldep = s_Reldep; -extern "C" { - pub fn pool_str2id(pool: *mut Pool, arg1: *const libc::c_char, arg2: libc::c_int) -> Id; -} -extern "C" { - pub fn pool_strn2id( - pool: *mut Pool, - arg1: *const libc::c_char, - arg2: libc::c_uint, - arg3: libc::c_int, - ) -> Id; -} -extern "C" { - pub fn pool_rel2id( - pool: *mut Pool, - arg1: Id, - arg2: Id, - arg3: libc::c_int, - arg4: libc::c_int, - ) -> Id; -} -extern "C" { - pub fn pool_id2str(pool: *const Pool, arg1: Id) -> *const libc::c_char; -} -extern "C" { - pub fn pool_id2rel(pool: *const Pool, arg1: Id) -> *const libc::c_char; -} -extern "C" { - pub fn pool_id2evr(pool: *const Pool, arg1: Id) -> *const libc::c_char; -} -extern "C" { - pub fn pool_dep2str(pool: *mut Pool, arg1: Id) -> *const libc::c_char; -} -extern "C" { - pub fn pool_shrink_strings(pool: *mut Pool); -} -extern "C" { - pub fn pool_shrink_rels(pool: *mut Pool); -} -extern "C" { - pub fn pool_freeidhashes(pool: *mut Pool); -} -extern "C" { - pub fn pool_resize_rels_hash(pool: *mut Pool, numnew: libc::c_int); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct s_Queue { - pub elements: *mut Id, - pub count: libc::c_int, - pub alloc: *mut Id, - pub left: libc::c_int, -} -pub type Queue = s_Queue; -extern "C" { - pub fn queue_alloc_one(q: *mut Queue); -} -extern "C" { - pub fn queue_alloc_one_head(q: *mut Queue); -} -extern "C" { - pub fn queue_init(q: *mut Queue); -} -extern "C" { - pub fn queue_init_buffer(q: *mut Queue, buf: *mut Id, size: libc::c_int); -} -extern "C" { - pub fn queue_init_clone(target: *mut Queue, source: *const Queue); -} -extern "C" { - pub fn queue_free(q: *mut Queue); -} -extern "C" { - pub fn queue_insert(q: *mut Queue, pos: libc::c_int, id: Id); -} -extern "C" { - pub fn queue_insert2(q: *mut Queue, pos: libc::c_int, id1: Id, id2: Id); -} -extern "C" { - pub fn queue_insertn(q: *mut Queue, pos: libc::c_int, n: libc::c_int, elements: *const Id); -} -extern "C" { - pub fn queue_delete(q: *mut Queue, pos: libc::c_int); -} -extern "C" { - pub fn queue_delete2(q: *mut Queue, pos: libc::c_int); -} -extern "C" { - pub fn queue_deleten(q: *mut Queue, pos: libc::c_int, n: libc::c_int); -} -extern "C" { - pub fn queue_prealloc(q: *mut Queue, n: libc::c_int); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct s_Map { - pub map: *mut libc::c_uchar, - pub size: libc::c_int, -} -pub type Map = s_Map; -extern "C" { - pub fn map_init(m: *mut Map, n: libc::c_int); -} -extern "C" { - pub fn map_init_clone(target: *mut Map, source: *const Map); -} -extern "C" { - pub fn map_grow(m: *mut Map, n: libc::c_int); -} -extern "C" { - pub fn map_free(m: *mut Map); -} -extern "C" { - pub fn map_and(t: *mut Map, s: *const Map); -} -extern "C" { - pub fn map_or(t: *mut Map, s: *const Map); -} -extern "C" { - pub fn map_subtract(t: *mut Map, s: *const Map); -} -extern "C" { - pub fn map_invertall(m: *mut Map); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct s_Solvable { - pub name: Id, - pub arch: Id, - pub evr: Id, - pub vendor: Id, - pub repo: *mut s_Repo, - pub provides: Offset, - pub obsoletes: Offset, - pub conflicts: Offset, - pub requires: Offset, - pub recommends: Offset, - pub suggests: Offset, - pub supplements: Offset, - pub enhances: Offset, -} -pub type Solvable = s_Solvable; -extern "C" { - pub fn solvable_lookup_type(s: *mut Solvable, keyname: Id) -> Id; -} -extern "C" { - pub fn solvable_lookup_id(s: *mut Solvable, keyname: Id) -> Id; -} -extern "C" { - pub fn solvable_lookup_num( - s: *mut Solvable, - keyname: Id, - notfound: libc::c_ulonglong, - ) -> libc::c_ulonglong; -} -extern "C" { - pub fn solvable_lookup_sizek( - s: *mut Solvable, - keyname: Id, - notfound: libc::c_ulonglong, - ) -> libc::c_ulonglong; -} -extern "C" { - pub fn solvable_lookup_str(s: *mut Solvable, keyname: Id) -> *const libc::c_char; -} -extern "C" { - pub fn solvable_lookup_str_poollang(s: *mut Solvable, keyname: Id) -> *const libc::c_char; -} -extern "C" { - pub fn solvable_lookup_str_lang( - s: *mut Solvable, - keyname: Id, - lang: *const libc::c_char, - usebase: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn solvable_lookup_bool(s: *mut Solvable, keyname: Id) -> libc::c_int; -} -extern "C" { - pub fn solvable_lookup_void(s: *mut Solvable, keyname: Id) -> libc::c_int; -} -extern "C" { - pub fn solvable_get_location( - s: *mut Solvable, - medianrp: *mut libc::c_uint, - ) -> *const libc::c_char; -} -extern "C" { - pub fn solvable_lookup_location( - s: *mut Solvable, - medianrp: *mut libc::c_uint, - ) -> *const libc::c_char; -} -extern "C" { - pub fn solvable_lookup_sourcepkg(s: *mut Solvable) -> *const libc::c_char; -} -extern "C" { - pub fn solvable_lookup_bin_checksum( - s: *mut Solvable, - keyname: Id, - typep: *mut Id, - ) -> *const libc::c_uchar; -} -extern "C" { - pub fn solvable_lookup_checksum( - s: *mut Solvable, - keyname: Id, - typep: *mut Id, - ) -> *const libc::c_char; -} -extern "C" { - pub fn solvable_lookup_idarray(s: *mut Solvable, keyname: Id, q: *mut Queue) -> libc::c_int; -} -extern "C" { - pub fn solvable_lookup_deparray( - s: *mut Solvable, - keyname: Id, - q: *mut Queue, - marker: Id, - ) -> libc::c_int; -} -extern "C" { - pub fn solvable_lookup_count(s: *mut Solvable, keyname: Id) -> libc::c_uint; -} -extern "C" { - pub fn solvable_set_id(s: *mut Solvable, keyname: Id, id: Id); -} -extern "C" { - pub fn solvable_set_num(s: *mut Solvable, keyname: Id, num: libc::c_ulonglong); -} -extern "C" { - pub fn solvable_set_str(s: *mut Solvable, keyname: Id, str_: *const libc::c_char); -} -extern "C" { - pub fn solvable_set_poolstr(s: *mut Solvable, keyname: Id, str_: *const libc::c_char); -} -extern "C" { - pub fn solvable_add_poolstr_array(s: *mut Solvable, keyname: Id, str_: *const libc::c_char); -} -extern "C" { - pub fn solvable_add_idarray(s: *mut Solvable, keyname: Id, id: Id); -} -extern "C" { - pub fn solvable_add_deparray(s: *mut Solvable, keyname: Id, dep: Id, marker: Id); -} -extern "C" { - pub fn solvable_set_idarray(s: *mut Solvable, keyname: Id, q: *mut Queue); -} -extern "C" { - pub fn solvable_set_deparray(s: *mut Solvable, keyname: Id, q: *mut Queue, marker: Id); -} -extern "C" { - pub fn solvable_unset(s: *mut Solvable, keyname: Id); -} -extern "C" { - pub fn solvable_identical(s1: *mut Solvable, s2: *mut Solvable) -> libc::c_int; -} -extern "C" { - pub fn solvable_selfprovidedep(s: *mut Solvable) -> Id; -} -extern "C" { - pub fn solvable_matchesdep( - s: *mut Solvable, - keyname: Id, - dep: Id, - marker: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn solvable_matchessolvable( - s: *mut Solvable, - keyname: Id, - solvid: Id, - depq: *mut Queue, - marker: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn solvable_matchessolvable_int( - s: *mut Solvable, - keyname: Id, - marker: libc::c_int, - solvid: Id, - solvidmap: *mut Map, - depq: *mut Queue, - missc: *mut Map, - reloff: libc::c_int, - outdepq: *mut Queue, - ) -> libc::c_int; -} -extern "C" { - pub fn solvable_is_irrelevant_patch(s: *mut Solvable, installedmap: *mut Map) -> libc::c_int; -} -extern "C" { - pub fn solvable_trivial_installable_map( - s: *mut Solvable, - installedmap: *mut Map, - conflictsmap: *mut Map, - multiversionmap: *mut Map, - ) -> libc::c_int; -} -extern "C" { - pub fn solvable_trivial_installable_queue( - s: *mut Solvable, - installed: *mut Queue, - multiversionmap: *mut Map, - ) -> libc::c_int; -} -extern "C" { - pub fn solvable_trivial_installable_repo( - s: *mut Solvable, - installed: *mut s_Repo, - multiversionmap: *mut Map, - ) -> libc::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct s_Stringpool { - pub strings: *mut Offset, - pub nstrings: libc::c_int, - pub stringspace: *mut libc::c_char, - pub sstrings: Offset, - pub stringhashtbl: Hashtable, - pub stringhashmask: Hashval, -} -extern "C" { - pub fn stringpool_init(ss: *mut Stringpool, strs: *mut *const libc::c_char); -} -extern "C" { - pub fn stringpool_init_empty(ss: *mut Stringpool); -} -extern "C" { - pub fn stringpool_clone(ss: *mut Stringpool, from: *mut Stringpool); -} -extern "C" { - pub fn stringpool_free(ss: *mut Stringpool); -} -extern "C" { - pub fn stringpool_freehash(ss: *mut Stringpool); -} -extern "C" { - pub fn stringpool_resize_hash(ss: *mut Stringpool, numnew: libc::c_int); -} -extern "C" { - pub fn stringpool_str2id( - ss: *mut Stringpool, - str_: *const libc::c_char, - create: libc::c_int, - ) -> Id; -} -extern "C" { - pub fn stringpool_strn2id( - ss: *mut Stringpool, - str_: *const libc::c_char, - len: libc::c_uint, - create: libc::c_int, - ) -> Id; -} -extern "C" { - pub fn stringpool_shrink(ss: *mut Stringpool); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct s_Datapos { - pub repo: *mut s_Repo, - pub solvid: Id, - pub repodataid: Id, - pub schema: Id, - pub dp: Id, -} -pub type Datapos = s_Datapos; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct s_Pool { - pub appdata: *mut libc::c_void, - pub ss: s_Stringpool, - pub rels: *mut Reldep, - pub nrels: libc::c_int, - pub repos: *mut *mut s_Repo, - pub nrepos: libc::c_int, - pub urepos: libc::c_int, - pub installed: *mut s_Repo, - pub solvables: *mut Solvable, - pub nsolvables: libc::c_int, - pub languages: *mut *const libc::c_char, - pub nlanguages: libc::c_int, - pub disttype: libc::c_int, - pub id2arch: *mut Id, - pub id2color: *mut libc::c_uchar, - pub lastarch: Id, - pub vendormap: Queue, - pub vendorclasses: *mut *const libc::c_char, - pub whatprovides: *mut Offset, - pub whatprovides_rel: *mut Offset, - pub whatprovidesdata: *mut Id, - pub whatprovidesdataoff: Offset, - pub whatprovidesdataleft: libc::c_int, - pub considered: *mut Map, - pub nscallback: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut s_Pool, data: *mut libc::c_void, name: Id, evr: Id) -> Id, - >, - pub nscallbackdata: *mut libc::c_void, - pub debugmask: libc::c_int, - pub debugcallback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut s_Pool, - data: *mut libc::c_void, - type_: libc::c_int, - str_: *const libc::c_char, - ), - >, - pub debugcallbackdata: *mut libc::c_void, - pub loadcallback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut s_Pool, - arg2: *mut s_Repodata, - arg3: *mut libc::c_void, - ) -> libc::c_int, - >, - pub loadcallbackdata: *mut libc::c_void, - pub pos: Datapos, - pub pooljobs: Queue, -} -extern "C" { - pub fn pool_create() -> *mut Pool; -} -extern "C" { - pub fn pool_free(pool: *mut Pool); -} -extern "C" { - pub fn pool_freeallrepos(pool: *mut Pool, reuseids: libc::c_int); -} -extern "C" { - pub fn pool_setdebuglevel(pool: *mut Pool, level: libc::c_int); -} -extern "C" { - pub fn pool_setdisttype(pool: *mut Pool, disttype: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn pool_set_flag(pool: *mut Pool, flag: libc::c_int, value: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn pool_get_flag(pool: *mut Pool, flag: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn pool_debug(pool: *mut Pool, type_: libc::c_int, format: *const libc::c_char, ...); -} -extern "C" { - pub fn pool_setdebugcallback( - pool: *mut Pool, - debugcallback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut s_Pool, - data: *mut libc::c_void, - type_: libc::c_int, - str_: *const libc::c_char, - ), - >, - debugcallbackdata: *mut libc::c_void, - ); -} -extern "C" { - pub fn pool_setdebugmask(pool: *mut Pool, mask: libc::c_int); -} -extern "C" { - pub fn pool_setloadcallback( - pool: *mut Pool, - cb: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut s_Pool, - arg2: *mut s_Repodata, - arg3: *mut libc::c_void, - ) -> libc::c_int, - >, - loadcbdata: *mut libc::c_void, - ); -} -extern "C" { - pub fn pool_setnamespacecallback( - pool: *mut Pool, - cb: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut s_Pool, - arg2: *mut libc::c_void, - arg3: Id, - arg4: Id, - ) -> Id, - >, - nscbdata: *mut libc::c_void, - ); -} -extern "C" { - pub fn pool_flush_namespaceproviders(pool: *mut Pool, ns: Id, evr: Id); -} -extern "C" { - pub fn pool_set_custom_vendorcheck( - pool: *mut Pool, - vendorcheck: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut s_Pool, - arg2: *mut Solvable, - arg3: *mut Solvable, - ) -> libc::c_int, - >, - ); -} -extern "C" { - pub fn pool_get_custom_vendorcheck( - pool: *mut Pool, - ) -> ::std::option::Option< - unsafe extern "C" fn( - pool: *mut s_Pool, - arg1: *mut Solvable, - arg2: *mut Solvable, - ) -> libc::c_int, - >; -} -extern "C" { - pub fn pool_alloctmpspace(pool: *mut Pool, len: libc::c_int) -> *mut libc::c_char; -} -extern "C" { - pub fn pool_freetmpspace(pool: *mut Pool, space: *const libc::c_char); -} -extern "C" { - pub fn pool_tmpjoin( - pool: *mut Pool, - str1: *const libc::c_char, - str2: *const libc::c_char, - str3: *const libc::c_char, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn pool_tmpappend( - pool: *mut Pool, - str1: *const libc::c_char, - str2: *const libc::c_char, - str3: *const libc::c_char, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn pool_bin2hex( - pool: *mut Pool, - buf: *const libc::c_uchar, - len: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn pool_set_installed(pool: *mut Pool, repo: *mut s_Repo); -} -extern "C" { - pub fn pool_error( - pool: *mut Pool, - ret: libc::c_int, - format: *const libc::c_char, - ... - ) -> libc::c_int; -} -extern "C" { - pub fn pool_errstr(pool: *mut Pool) -> *mut libc::c_char; -} -extern "C" { - pub fn pool_set_rootdir(pool: *mut Pool, rootdir: *const libc::c_char); -} -extern "C" { - pub fn pool_get_rootdir(pool: *mut Pool) -> *const libc::c_char; -} -extern "C" { - pub fn pool_prepend_rootdir(pool: *mut Pool, dir: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn pool_prepend_rootdir_tmp( - pool: *mut Pool, - dir: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - #[doc = " Solvable management"] - pub fn pool_add_solvable(pool: *mut Pool) -> Id; -} -extern "C" { - pub fn pool_add_solvable_block(pool: *mut Pool, count: libc::c_int) -> Id; -} -extern "C" { - pub fn pool_free_solvable_block( - pool: *mut Pool, - start: Id, - count: libc::c_int, - reuseids: libc::c_int, - ); -} -extern "C" { - pub fn pool_solvable2str(pool: *mut Pool, s: *mut Solvable) -> *const libc::c_char; -} -extern "C" { - pub fn pool_set_languages( - pool: *mut Pool, - languages: *mut *const libc::c_char, - nlanguages: libc::c_int, - ); -} -extern "C" { - pub fn pool_id2langid( - pool: *mut Pool, - id: Id, - lang: *const libc::c_char, - create: libc::c_int, - ) -> Id; -} -extern "C" { - pub fn pool_intersect_evrs( - pool: *mut Pool, - pflags: libc::c_int, - pevr: Id, - flags: libc::c_int, - evr: Id, - ) -> libc::c_int; -} -extern "C" { - pub fn pool_match_dep(pool: *mut Pool, d1: Id, d2: Id) -> libc::c_int; -} -extern "C" { - pub fn pool_match_nevr_rel(pool: *mut Pool, s: *mut Solvable, d: Id) -> libc::c_int; -} -extern "C" { - #[doc = " Prepares a pool for solving"] - pub fn pool_createwhatprovides(pool: *mut Pool); -} -extern "C" { - pub fn pool_addfileprovides(pool: *mut Pool); -} -extern "C" { - pub fn pool_addfileprovides_queue(pool: *mut Pool, idq: *mut Queue, idqinst: *mut Queue); -} -extern "C" { - pub fn pool_freewhatprovides(pool: *mut Pool); -} -extern "C" { - pub fn pool_queuetowhatprovides(pool: *mut Pool, q: *mut Queue) -> Id; -} -extern "C" { - pub fn pool_ids2whatprovides(pool: *mut Pool, ids: *mut Id, count: libc::c_int) -> Id; -} -extern "C" { - pub fn pool_searchlazywhatprovidesq(pool: *mut Pool, d: Id) -> Id; -} -extern "C" { - pub fn pool_addrelproviders(pool: *mut Pool, d: Id) -> Id; -} -extern "C" { - pub fn pool_whatmatchesdep( - pool: *mut Pool, - keyname: Id, - dep: Id, - q: *mut Queue, - marker: libc::c_int, - ); -} -extern "C" { - pub fn pool_whatcontainsdep( - pool: *mut Pool, - keyname: Id, - dep: Id, - q: *mut Queue, - marker: libc::c_int, - ); -} -extern "C" { - pub fn pool_whatmatchessolvable( - pool: *mut Pool, - keyname: Id, - solvid: Id, - q: *mut Queue, - marker: libc::c_int, - ); -} -extern "C" { - pub fn pool_set_whatprovides(pool: *mut Pool, id: Id, providers: Id); -} -extern "C" { - pub fn pool_search( - pool: *mut Pool, - p: Id, - key: Id, - match_: *const libc::c_char, - flags: libc::c_int, - callback: ::std::option::Option< - unsafe extern "C" fn( - cbdata: *mut libc::c_void, - s: *mut Solvable, - data: *mut s_Repodata, - key: *mut s_Repokey, - kv: *mut s_KeyValue, - ) -> libc::c_int, - >, - cbdata: *mut libc::c_void, - ); -} -extern "C" { - pub fn pool_clear_pos(pool: *mut Pool); -} -extern "C" { - pub fn pool_lookup_str(pool: *mut Pool, entry: Id, keyname: Id) -> *const libc::c_char; -} -extern "C" { - pub fn pool_lookup_id(pool: *mut Pool, entry: Id, keyname: Id) -> Id; -} -extern "C" { - pub fn pool_lookup_num( - pool: *mut Pool, - entry: Id, - keyname: Id, - notfound: libc::c_ulonglong, - ) -> libc::c_ulonglong; -} -extern "C" { - pub fn pool_lookup_void(pool: *mut Pool, entry: Id, keyname: Id) -> libc::c_int; -} -extern "C" { - pub fn pool_lookup_bin_checksum( - pool: *mut Pool, - entry: Id, - keyname: Id, - typep: *mut Id, - ) -> *const libc::c_uchar; -} -extern "C" { - pub fn pool_lookup_idarray( - pool: *mut Pool, - entry: Id, - keyname: Id, - q: *mut Queue, - ) -> libc::c_int; -} -extern "C" { - pub fn pool_lookup_checksum( - pool: *mut Pool, - entry: Id, - keyname: Id, - typep: *mut Id, - ) -> *const libc::c_char; -} -extern "C" { - pub fn pool_lookup_deltalocation( - pool: *mut Pool, - entry: Id, - medianrp: *mut libc::c_uint, - ) -> *const libc::c_char; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct s_DUChanges { - pub path: *const libc::c_char, - pub kbytes: libc::c_longlong, - pub files: libc::c_longlong, - pub flags: libc::c_int, -} -pub type DUChanges = s_DUChanges; -extern "C" { - pub fn pool_create_state_maps( - pool: *mut Pool, - installed: *mut Queue, - installedmap: *mut Map, - conflictsmap: *mut Map, - ); -} -extern "C" { - pub fn pool_calc_duchanges( - pool: *mut Pool, - installedmap: *mut Map, - mps: *mut DUChanges, - nmps: libc::c_int, - ); -} -extern "C" { - pub fn pool_calc_installsizechange(pool: *mut Pool, installedmap: *mut Map) - -> libc::c_longlong; -} -extern "C" { - pub fn pool_add_fileconflicts_deps(pool: *mut Pool, conflicts: *mut Queue); -} -extern "C" { - pub fn pool_trivial_installable_multiversionmap( - pool: *mut Pool, - installedmap: *mut Map, - pkgs: *mut Queue, - res: *mut Queue, - multiversionmap: *mut Map, - ); -} -extern "C" { - pub fn pool_trivial_installable( - pool: *mut Pool, - installedmap: *mut Map, - pkgs: *mut Queue, - res: *mut Queue, - ); -} -extern "C" { - pub fn pool_setarch(arg1: *mut Pool, arg2: *const libc::c_char); -} -extern "C" { - pub fn pool_setarchpolicy(arg1: *mut Pool, arg2: *const libc::c_char); -} -extern "C" { - pub fn pool_arch2color_slow(pool: *mut Pool, arch: Id) -> libc::c_uchar; -} -extern "C" { - #[doc = " malloc\n exits with error message on error"] - pub fn solv_malloc(arg1: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn solv_malloc2(arg1: usize, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn solv_calloc(arg1: usize, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn solv_realloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn solv_realloc2(arg1: *mut libc::c_void, arg2: usize, arg3: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn solv_extend_realloc( - arg1: *mut libc::c_void, - arg2: usize, - arg3: usize, - arg4: usize, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn solv_free(arg1: *mut libc::c_void) -> *mut libc::c_void; -} -extern "C" { - pub fn solv_strdup(arg1: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn solv_oom(arg1: usize, arg2: usize); -} -extern "C" { - pub fn solv_timems(subtract: libc::c_uint) -> libc::c_uint; -} -extern "C" { - pub fn solv_setcloexec(fd: libc::c_int, state: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn solv_sort( - base: *mut libc::c_void, - nmemb: usize, - size: usize, - compar: ::std::option::Option< - unsafe extern "C" fn( - arg1: *const libc::c_void, - arg2: *const libc::c_void, - arg3: *mut libc::c_void, - ) -> libc::c_int, - >, - compard: *mut libc::c_void, - ); -} -extern "C" { - pub fn solv_dupjoin( - str1: *const libc::c_char, - str2: *const libc::c_char, - str3: *const libc::c_char, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn solv_dupappend( - str1: *const libc::c_char, - str2: *const libc::c_char, - str3: *const libc::c_char, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn solv_hex2bin( - strp: *mut *const libc::c_char, - buf: *mut libc::c_uchar, - bufl: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn solv_bin2hex( - buf: *const libc::c_uchar, - l: libc::c_int, - str_: *mut libc::c_char, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn solv_validutf8(buf: *const libc::c_char) -> usize; -} -extern "C" { - pub fn solv_latin1toutf8(buf: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn solv_replacebadutf8( - buf: *const libc::c_char, - replchar: libc::c_int, - ) -> *mut libc::c_char; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct s_Dirpool { - pub dirs: *mut Id, - pub ndirs: libc::c_int, - pub dirtraverse: *mut Id, -} -pub type Dirpool = s_Dirpool; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct s_Repokey { - pub name: Id, - pub type_: Id, - pub size: libc::c_uint, - pub storage: libc::c_uint, -} -pub type Repokey = s_Repokey; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct s_Repodata { - pub repodataid: Id, - pub repo: *mut s_Repo, - pub state: libc::c_int, - pub loadcallback: ::std::option::Option, - pub start: libc::c_int, - pub end: libc::c_int, - pub keys: *mut Repokey, - pub nkeys: libc::c_int, - pub keybits: [libc::c_uchar; 32usize], - pub schemata: *mut Id, - pub nschemata: libc::c_int, - pub schemadata: *mut Id, - pub spool: Stringpool, - pub localpool: libc::c_int, - pub dirpool: Dirpool, -} -pub type Repodata = s_Repodata; -extern "C" { - pub fn repodata_initdata(data: *mut Repodata, repo: *mut s_Repo, localpool: libc::c_int); -} -extern "C" { - pub fn repodata_freedata(data: *mut Repodata); -} -extern "C" { - pub fn repodata_free(data: *mut Repodata); -} -extern "C" { - pub fn repodata_empty(data: *mut Repodata, localpool: libc::c_int); -} -extern "C" { - pub fn repodata_load(data: *mut Repodata); -} -extern "C" { - pub fn repodata_key2id(data: *mut Repodata, key: *mut Repokey, create: libc::c_int) -> Id; -} -extern "C" { - pub fn repodata_schema2id(data: *mut Repodata, schema: *mut Id, create: libc::c_int) -> Id; -} -extern "C" { - pub fn repodata_free_schemahash(data: *mut Repodata); -} -extern "C" { - pub fn repodata_search( - data: *mut Repodata, - solvid: Id, - keyname: Id, - flags: libc::c_int, - callback: ::std::option::Option< - unsafe extern "C" fn( - cbdata: *mut libc::c_void, - s: *mut Solvable, - data: *mut Repodata, - key: *mut Repokey, - kv: *mut s_KeyValue, - ) -> libc::c_int, - >, - cbdata: *mut libc::c_void, - ); -} -extern "C" { - pub fn repodata_search_keyskip( - data: *mut Repodata, - solvid: Id, - keyname: Id, - flags: libc::c_int, - keyskip: *mut Id, - callback: ::std::option::Option< - unsafe extern "C" fn( - cbdata: *mut libc::c_void, - s: *mut Solvable, - data: *mut Repodata, - key: *mut Repokey, - kv: *mut s_KeyValue, - ) -> libc::c_int, - >, - cbdata: *mut libc::c_void, - ); -} -extern "C" { - pub fn repodata_search_arrayelement( - data: *mut Repodata, - solvid: Id, - keyname: Id, - flags: libc::c_int, - kv: *mut s_KeyValue, - callback: ::std::option::Option< - unsafe extern "C" fn( - cbdata: *mut libc::c_void, - s: *mut Solvable, - data: *mut Repodata, - key: *mut Repokey, - kv: *mut s_KeyValue, - ) -> libc::c_int, - >, - cbdata: *mut libc::c_void, - ); -} -extern "C" { - pub fn repodata_stringify( - pool: *mut Pool, - data: *mut Repodata, - key: *mut Repokey, - kv: *mut s_KeyValue, - flags: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn repodata_set_filelisttype(data: *mut Repodata, filelisttype: libc::c_int); -} -extern "C" { - pub fn repodata_filelistfilter_matches( - data: *mut Repodata, - str_: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn repodata_free_filelistfilter(data: *mut Repodata); -} -extern "C" { - pub fn repodata_lookup_type(data: *mut Repodata, solvid: Id, keyname: Id) -> Id; -} -extern "C" { - pub fn repodata_lookup_id(data: *mut Repodata, solvid: Id, keyname: Id) -> Id; -} -extern "C" { - pub fn repodata_lookup_str(data: *mut Repodata, solvid: Id, keyname: Id) - -> *const libc::c_char; -} -extern "C" { - pub fn repodata_lookup_num( - data: *mut Repodata, - solvid: Id, - keyname: Id, - notfound: libc::c_ulonglong, - ) -> libc::c_ulonglong; -} -extern "C" { - pub fn repodata_lookup_void(data: *mut Repodata, solvid: Id, keyname: Id) -> libc::c_int; -} -extern "C" { - pub fn repodata_lookup_bin_checksum( - data: *mut Repodata, - solvid: Id, - keyname: Id, - typep: *mut Id, - ) -> *const libc::c_uchar; -} -extern "C" { - pub fn repodata_lookup_idarray( - data: *mut Repodata, - solvid: Id, - keyname: Id, - q: *mut Queue, - ) -> libc::c_int; -} -extern "C" { - pub fn repodata_lookup_binary( - data: *mut Repodata, - solvid: Id, - keyname: Id, - lenp: *mut libc::c_int, - ) -> *const libc::c_void; -} -extern "C" { - pub fn repodata_lookup_count(data: *mut Repodata, solvid: Id, keyname: Id) -> libc::c_uint; -} -extern "C" { - pub fn repodata_lookup_packed_dirstrarray( - data: *mut Repodata, - solvid: Id, - keyname: Id, - ) -> *const libc::c_uchar; -} -extern "C" { - pub fn repodata_fill_keyskip(data: *mut Repodata, solvid: Id, keyskip: *mut Id) -> *mut Id; -} -extern "C" { - pub fn repodata_extend(data: *mut Repodata, p: Id); -} -extern "C" { - pub fn repodata_extend_block(data: *mut Repodata, p: Id, num: libc::c_int); -} -extern "C" { - pub fn repodata_shrink(data: *mut Repodata, end: libc::c_int); -} -extern "C" { - pub fn repodata_internalize(data: *mut Repodata); -} -extern "C" { - pub fn repodata_new_handle(data: *mut Repodata) -> Id; -} -extern "C" { - pub fn repodata_set_void(data: *mut Repodata, solvid: Id, keyname: Id); -} -extern "C" { - pub fn repodata_set_num(data: *mut Repodata, solvid: Id, keyname: Id, num: libc::c_ulonglong); -} -extern "C" { - pub fn repodata_set_id(data: *mut Repodata, solvid: Id, keyname: Id, id: Id); -} -extern "C" { - pub fn repodata_set_str( - data: *mut Repodata, - solvid: Id, - keyname: Id, - str_: *const libc::c_char, - ); -} -extern "C" { - pub fn repodata_set_binary( - data: *mut Repodata, - solvid: Id, - keyname: Id, - buf: *mut libc::c_void, - len: libc::c_int, - ); -} -extern "C" { - pub fn repodata_set_poolstr( - data: *mut Repodata, - solvid: Id, - keyname: Id, - str_: *const libc::c_char, - ); -} -extern "C" { - pub fn repodata_set_constant( - data: *mut Repodata, - solvid: Id, - keyname: Id, - constant: libc::c_uint, - ); -} -extern "C" { - pub fn repodata_set_constantid(data: *mut Repodata, solvid: Id, keyname: Id, id: Id); -} -extern "C" { - pub fn repodata_set_bin_checksum( - data: *mut Repodata, - solvid: Id, - keyname: Id, - type_: Id, - buf: *const libc::c_uchar, - ); -} -extern "C" { - pub fn repodata_set_checksum( - data: *mut Repodata, - solvid: Id, - keyname: Id, - type_: Id, - str_: *const libc::c_char, - ); -} -extern "C" { - pub fn repodata_set_idarray(data: *mut Repodata, solvid: Id, keyname: Id, q: *mut Queue); -} -extern "C" { - pub fn repodata_add_dirnumnum( - data: *mut Repodata, - solvid: Id, - keyname: Id, - dir: Id, - num: Id, - num2: Id, - ); -} -extern "C" { - pub fn repodata_add_dirstr( - data: *mut Repodata, - solvid: Id, - keyname: Id, - dir: Id, - str_: *const libc::c_char, - ); -} -extern "C" { - pub fn repodata_free_dircache(data: *mut Repodata); -} -extern "C" { - pub fn repodata_add_idarray(data: *mut Repodata, solvid: Id, keyname: Id, id: Id); -} -extern "C" { - pub fn repodata_add_poolstr_array( - data: *mut Repodata, - solvid: Id, - keyname: Id, - str_: *const libc::c_char, - ); -} -extern "C" { - pub fn repodata_add_fixarray(data: *mut Repodata, solvid: Id, keyname: Id, ghandle: Id); -} -extern "C" { - pub fn repodata_add_flexarray(data: *mut Repodata, solvid: Id, keyname: Id, ghandle: Id); -} -extern "C" { - pub fn repodata_set_kv( - data: *mut Repodata, - solvid: Id, - keyname: Id, - keytype: Id, - kv: *mut s_KeyValue, - ); -} -extern "C" { - pub fn repodata_unset(data: *mut Repodata, solvid: Id, keyname: Id); -} -extern "C" { - pub fn repodata_unset_uninternalized(data: *mut Repodata, solvid: Id, keyname: Id); -} -extern "C" { - pub fn repodata_merge_attrs(data: *mut Repodata, dest: Id, src: Id); -} -extern "C" { - pub fn repodata_merge_some_attrs( - data: *mut Repodata, - dest: Id, - src: Id, - keyidmap: *mut Map, - overwrite: libc::c_int, - ); -} -extern "C" { - pub fn repodata_swap_attrs(data: *mut Repodata, dest: Id, src: Id); -} -extern "C" { - pub fn repodata_create_stubs(data: *mut Repodata) -> *mut Repodata; -} -extern "C" { - pub fn repodata_disable_paging(data: *mut Repodata); -} -extern "C" { - pub fn repodata_globalize_id(data: *mut Repodata, id: Id, create: libc::c_int) -> Id; -} -extern "C" { - pub fn repodata_localize_id(data: *mut Repodata, id: Id, create: libc::c_int) -> Id; -} -extern "C" { - pub fn repodata_translate_id( - data: *mut Repodata, - fromdata: *mut Repodata, - id: Id, - create: libc::c_int, - ) -> Id; -} -extern "C" { - pub fn repodata_translate_dir_slow( - data: *mut Repodata, - fromdata: *mut Repodata, - dir: Id, - create: libc::c_int, - cache: *mut Id, - ) -> Id; -} -extern "C" { - pub fn repodata_str2dir( - data: *mut Repodata, - dir: *const libc::c_char, - create: libc::c_int, - ) -> Id; -} -extern "C" { - pub fn repodata_dir2str( - data: *mut Repodata, - did: Id, - suf: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn repodata_chk2str( - data: *mut Repodata, - type_: Id, - buf: *const libc::c_uchar, - ) -> *const libc::c_char; -} -extern "C" { - pub fn repodata_set_location( - data: *mut Repodata, - solvid: Id, - medianr: libc::c_int, - dir: *const libc::c_char, - file: *const libc::c_char, - ); -} -extern "C" { - pub fn repodata_set_deltalocation( - data: *mut Repodata, - handle: Id, - medianr: libc::c_int, - dir: *const libc::c_char, - file: *const libc::c_char, - ); -} -extern "C" { - pub fn repodata_set_sourcepkg(data: *mut Repodata, solvid: Id, sourcepkg: *const libc::c_char); -} -extern "C" { - pub fn repodata_lookup_kv_uninternalized( - data: *mut Repodata, - solvid: Id, - keyname: Id, - kv: *mut s_KeyValue, - ) -> *mut Repokey; -} -extern "C" { - pub fn repodata_search_uninternalized( - data: *mut Repodata, - solvid: Id, - keyname: Id, - flags: libc::c_int, - callback: ::std::option::Option< - unsafe extern "C" fn( - cbdata: *mut libc::c_void, - s: *mut Solvable, - data: *mut Repodata, - key: *mut Repokey, - kv: *mut s_KeyValue, - ) -> libc::c_int, - >, - cbdata: *mut libc::c_void, - ); -} -extern "C" { - pub fn repodata_memused(data: *mut Repodata) -> libc::c_uint; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct s_KeyValue { - pub id: Id, - pub str_: *const libc::c_char, - pub num: libc::c_uint, - pub num2: libc::c_uint, - pub entry: libc::c_int, - pub eof: libc::c_int, - pub parent: *mut s_KeyValue, -} -pub type KeyValue = s_KeyValue; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct s_Datamatcher { - pub flags: libc::c_int, - pub match_: *const libc::c_char, - pub matchdata: *mut libc::c_void, - pub error: libc::c_int, -} -pub type Datamatcher = s_Datamatcher; -extern "C" { - pub fn datamatcher_init( - ma: *mut Datamatcher, - match_: *const libc::c_char, - flags: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn datamatcher_free(ma: *mut Datamatcher); -} -extern "C" { - pub fn datamatcher_match(ma: *mut Datamatcher, str_: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn datamatcher_checkbasename( - ma: *mut Datamatcher, - str_: *const libc::c_char, - ) -> libc::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct s_Dataiterator { - pub state: libc::c_int, - pub flags: libc::c_int, - pub pool: *mut Pool, - pub repo: *mut s_Repo, - pub data: *mut s_Repodata, - pub dp: *mut libc::c_uchar, - pub ddp: *mut libc::c_uchar, - pub idp: *mut Id, - pub keyp: *mut Id, - pub key: *mut s_Repokey, - pub kv: KeyValue, - pub matcher: Datamatcher, - pub keyname: Id, - pub repodataid: Id, - pub solvid: Id, - pub repoid: Id, - pub keynames: [Id; 4usize], - pub nkeynames: libc::c_int, - pub rootlevel: libc::c_int, - pub parents: [s_Dataiterator_di_parent; 3usize], - pub nparents: libc::c_int, - pub vert_ddp: *mut libc::c_uchar, - pub vert_off: Id, - pub vert_len: Id, - pub vert_storestate: Id, - pub dupstr: *mut libc::c_char, - pub dupstrn: libc::c_int, - pub keyskip: *mut Id, - pub oldkeyskip: *mut Id, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct s_Dataiterator_di_parent { - pub kv: KeyValue, - pub dp: *mut libc::c_uchar, - pub keyp: *mut Id, -} -pub type Dataiterator = s_Dataiterator; -extern "C" { - pub fn dataiterator_init( - di: *mut Dataiterator, - pool: *mut Pool, - repo: *mut s_Repo, - p: Id, - keyname: Id, - match_: *const libc::c_char, - flags: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn dataiterator_init_clone(di: *mut Dataiterator, from: *mut Dataiterator); -} -extern "C" { - pub fn dataiterator_set_search(di: *mut Dataiterator, repo: *mut s_Repo, p: Id); -} -extern "C" { - pub fn dataiterator_set_keyname(di: *mut Dataiterator, keyname: Id); -} -extern "C" { - pub fn dataiterator_set_match( - di: *mut Dataiterator, - match_: *const libc::c_char, - flags: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn dataiterator_prepend_keyname(di: *mut Dataiterator, keyname: Id); -} -extern "C" { - pub fn dataiterator_free(di: *mut Dataiterator); -} -extern "C" { - pub fn dataiterator_step(di: *mut Dataiterator) -> libc::c_int; -} -extern "C" { - pub fn dataiterator_setpos(di: *mut Dataiterator); -} -extern "C" { - pub fn dataiterator_setpos_parent(di: *mut Dataiterator); -} -extern "C" { - pub fn dataiterator_match(di: *mut Dataiterator, ma: *mut Datamatcher) -> libc::c_int; -} -extern "C" { - pub fn dataiterator_skip_attribute(di: *mut Dataiterator); -} -extern "C" { - pub fn dataiterator_skip_solvable(di: *mut Dataiterator); -} -extern "C" { - pub fn dataiterator_skip_repo(di: *mut Dataiterator); -} -extern "C" { - pub fn dataiterator_jump_to_solvid(di: *mut Dataiterator, solvid: Id); -} -extern "C" { - pub fn dataiterator_jump_to_repo(di: *mut Dataiterator, repo: *mut s_Repo); -} -extern "C" { - pub fn dataiterator_entersub(di: *mut Dataiterator); -} -extern "C" { - pub fn dataiterator_clonepos(di: *mut Dataiterator, from: *mut Dataiterator); -} -extern "C" { - pub fn dataiterator_seek(di: *mut Dataiterator, whence: libc::c_int); -} -extern "C" { - pub fn dataiterator_strdup(di: *mut Dataiterator); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct s_Repo { - pub name: *const libc::c_char, - pub repoid: Id, - pub appdata: *mut libc::c_void, - pub pool: *mut Pool, - pub start: libc::c_int, - pub end: libc::c_int, - pub nsolvables: libc::c_int, - pub disabled: libc::c_int, - pub priority: libc::c_int, - pub subpriority: libc::c_int, - pub idarraydata: *mut Id, - pub idarraysize: libc::c_int, - pub nrepodata: libc::c_int, - pub rpmdbid: *mut Id, -} -pub type Repo = s_Repo; -extern "C" { - pub fn repo_create(pool: *mut Pool, name: *const libc::c_char) -> *mut Repo; -} -extern "C" { - pub fn repo_free(repo: *mut Repo, reuseids: libc::c_int); -} -extern "C" { - pub fn repo_empty(repo: *mut Repo, reuseids: libc::c_int); -} -extern "C" { - pub fn repo_freedata(repo: *mut Repo); -} -extern "C" { - pub fn repo_add_solvable(repo: *mut Repo) -> Id; -} -extern "C" { - pub fn repo_add_solvable_block(repo: *mut Repo, count: libc::c_int) -> Id; -} -extern "C" { - pub fn repo_free_solvable(repo: *mut Repo, p: Id, reuseids: libc::c_int); -} -extern "C" { - pub fn repo_free_solvable_block( - repo: *mut Repo, - start: Id, - count: libc::c_int, - reuseids: libc::c_int, - ); -} -extern "C" { - pub fn repo_sidedata_create(repo: *mut Repo, size: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn repo_sidedata_extend( - repo: *mut Repo, - b: *mut libc::c_void, - size: usize, - p: Id, - count: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn repo_add_solvable_block_before( - repo: *mut Repo, - count: libc::c_int, - beforerepo: *mut Repo, - ) -> Id; -} -extern "C" { - pub fn repo_addid(repo: *mut Repo, olddeps: Offset, id: Id) -> Offset; -} -extern "C" { - pub fn repo_addid_dep(repo: *mut Repo, olddeps: Offset, id: Id, marker: Id) -> Offset; -} -extern "C" { - pub fn repo_reserve_ids(repo: *mut Repo, olddeps: Offset, num: libc::c_int) -> Offset; -} -extern "C" { - pub fn repo_add_repodata(repo: *mut Repo, flags: libc::c_int) -> *mut Repodata; -} -extern "C" { - pub fn repo_id2repodata(repo: *mut Repo, id: Id) -> *mut Repodata; -} -extern "C" { - pub fn repo_last_repodata(repo: *mut Repo) -> *mut Repodata; -} -extern "C" { - pub fn repo_search( - repo: *mut Repo, - p: Id, - key: Id, - match_: *const libc::c_char, - flags: libc::c_int, - callback: ::std::option::Option< - unsafe extern "C" fn( - cbdata: *mut libc::c_void, - s: *mut Solvable, - data: *mut Repodata, - key: *mut Repokey, - kv: *mut KeyValue, - ) -> libc::c_int, - >, - cbdata: *mut libc::c_void, - ); -} -extern "C" { - pub fn repo_lookup_repodata(repo: *mut Repo, entry: Id, keyname: Id) -> *mut Repodata; -} -extern "C" { - pub fn repo_lookup_repodata_opt(repo: *mut Repo, entry: Id, keyname: Id) -> *mut Repodata; -} -extern "C" { - pub fn repo_lookup_filelist_repodata( - repo: *mut Repo, - entry: Id, - matcher: *mut Datamatcher, - ) -> *mut Repodata; -} -extern "C" { - pub fn repo_lookup_type(repo: *mut Repo, entry: Id, keyname: Id) -> Id; -} -extern "C" { - pub fn repo_lookup_str(repo: *mut Repo, entry: Id, keyname: Id) -> *const libc::c_char; -} -extern "C" { - pub fn repo_lookup_num( - repo: *mut Repo, - entry: Id, - keyname: Id, - notfound: libc::c_ulonglong, - ) -> libc::c_ulonglong; -} -extern "C" { - pub fn repo_lookup_id(repo: *mut Repo, entry: Id, keyname: Id) -> Id; -} -extern "C" { - pub fn repo_lookup_idarray( - repo: *mut Repo, - entry: Id, - keyname: Id, - q: *mut Queue, - ) -> libc::c_int; -} -extern "C" { - pub fn repo_lookup_deparray( - repo: *mut Repo, - entry: Id, - keyname: Id, - q: *mut Queue, - marker: Id, - ) -> libc::c_int; -} -extern "C" { - pub fn repo_lookup_void(repo: *mut Repo, entry: Id, keyname: Id) -> libc::c_int; -} -extern "C" { - pub fn repo_lookup_checksum( - repo: *mut Repo, - entry: Id, - keyname: Id, - typep: *mut Id, - ) -> *const libc::c_char; -} -extern "C" { - pub fn repo_lookup_bin_checksum( - repo: *mut Repo, - entry: Id, - keyname: Id, - typep: *mut Id, - ) -> *const libc::c_uchar; -} -extern "C" { - pub fn repo_lookup_binary( - repo: *mut Repo, - entry: Id, - keyname: Id, - lenp: *mut libc::c_int, - ) -> *const libc::c_void; -} -extern "C" { - pub fn repo_lookup_count(repo: *mut Repo, entry: Id, keyname: Id) -> libc::c_uint; -} -extern "C" { - pub fn solv_depmarker(keyname: Id, marker: Id) -> Id; -} -extern "C" { - pub fn repo_set_id(repo: *mut Repo, p: Id, keyname: Id, id: Id); -} -extern "C" { - pub fn repo_set_num(repo: *mut Repo, p: Id, keyname: Id, num: libc::c_ulonglong); -} -extern "C" { - pub fn repo_set_str(repo: *mut Repo, p: Id, keyname: Id, str_: *const libc::c_char); -} -extern "C" { - pub fn repo_set_poolstr(repo: *mut Repo, p: Id, keyname: Id, str_: *const libc::c_char); -} -extern "C" { - pub fn repo_add_poolstr_array(repo: *mut Repo, p: Id, keyname: Id, str_: *const libc::c_char); -} -extern "C" { - pub fn repo_add_idarray(repo: *mut Repo, p: Id, keyname: Id, id: Id); -} -extern "C" { - pub fn repo_add_deparray(repo: *mut Repo, p: Id, keyname: Id, dep: Id, marker: Id); -} -extern "C" { - pub fn repo_set_idarray(repo: *mut Repo, p: Id, keyname: Id, q: *mut Queue); -} -extern "C" { - pub fn repo_set_deparray(repo: *mut Repo, p: Id, keyname: Id, q: *mut Queue, marker: Id); -} -extern "C" { - pub fn repo_unset(repo: *mut Repo, p: Id, keyname: Id); -} -extern "C" { - pub fn repo_internalize(repo: *mut Repo); -} -extern "C" { - pub fn repo_disable_paging(repo: *mut Repo); -} -extern "C" { - pub fn repo_create_keyskip(repo: *mut Repo, entry: Id, oldkeyskip: *mut *mut Id) -> *mut Id; -} -extern "C" { - pub fn repo_fix_supplements( - repo: *mut Repo, - provides: Offset, - supplements: Offset, - freshens: Offset, - ) -> Offset; -} -extern "C" { - pub fn repo_fix_conflicts(repo: *mut Repo, conflicts: Offset) -> Offset; -} -extern "C" { - pub fn repo_rewrite_suse_deps(s: *mut Solvable, freshens: Offset); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct s_Transaction { - pub pool: *mut s_Pool, - pub steps: Queue, -} -pub type Transaction = s_Transaction; -extern "C" { - pub fn transaction_create(pool: *mut s_Pool) -> *mut Transaction; -} -extern "C" { - pub fn transaction_create_decisionq( - pool: *mut s_Pool, - decisionq: *mut Queue, - multiversionmap: *mut Map, - ) -> *mut Transaction; -} -extern "C" { - pub fn transaction_create_clone(srctrans: *mut Transaction) -> *mut Transaction; -} -extern "C" { - pub fn transaction_free(trans: *mut Transaction); -} -extern "C" { - pub fn transaction_obs_pkg(trans: *mut Transaction, p: Id) -> Id; -} -extern "C" { - pub fn transaction_all_obs_pkgs(trans: *mut Transaction, p: Id, pkgs: *mut Queue); -} -extern "C" { - pub fn transaction_type(trans: *mut Transaction, p: Id, mode: libc::c_int) -> Id; -} -extern "C" { - pub fn transaction_classify(trans: *mut Transaction, mode: libc::c_int, classes: *mut Queue); -} -extern "C" { - pub fn transaction_classify_pkgs( - trans: *mut Transaction, - mode: libc::c_int, - type_: Id, - from: Id, - to: Id, - pkgs: *mut Queue, - ); -} -extern "C" { - pub fn transaction_installedresult( - trans: *mut Transaction, - installedq: *mut Queue, - ) -> libc::c_int; -} -extern "C" { - pub fn transaction_calc_installsizechange(trans: *mut Transaction) -> libc::c_longlong; -} -extern "C" { - pub fn transaction_calc_duchanges( - trans: *mut Transaction, - mps: *mut s_DUChanges, - nmps: libc::c_int, - ); -} -extern "C" { - pub fn transaction_order(trans: *mut Transaction, flags: libc::c_int); -} -extern "C" { - pub fn transaction_order_add_choices( - trans: *mut Transaction, - chosen: Id, - choices: *mut Queue, - ) -> libc::c_int; -} -extern "C" { - pub fn transaction_add_obsoleted(trans: *mut Transaction); -} -extern "C" { - pub fn transaction_check_order(trans: *mut Transaction); -} -extern "C" { - pub fn transaction_order_get_cycleids( - trans: *mut Transaction, - q: *mut Queue, - minseverity: libc::c_int, - ); -} -extern "C" { - pub fn transaction_order_get_cycle( - trans: *mut Transaction, - cid: Id, - q: *mut Queue, - ) -> libc::c_int; -} -extern "C" { - pub fn transaction_order_get_edges( - trans: *mut Transaction, - p: Id, - q: *mut Queue, - unbroken: libc::c_int, - ); -} -extern "C" { - pub fn transaction_free_orderdata(trans: *mut Transaction); -} -extern "C" { - pub fn transaction_clone_orderdata(trans: *mut Transaction, srctrans: *mut Transaction); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct s_Rule { - pub p: Id, - pub d: Id, - pub w1: Id, - pub w2: Id, - pub n1: Id, - pub n2: Id, -} -pub type Rule = s_Rule; -pub const SolverRuleinfo_SOLVER_RULE_UNKNOWN: SolverRuleinfo = 0; -pub const SolverRuleinfo_SOLVER_RULE_PKG: SolverRuleinfo = 256; -pub const SolverRuleinfo_SOLVER_RULE_PKG_NOT_INSTALLABLE: SolverRuleinfo = 257; -pub const SolverRuleinfo_SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP: SolverRuleinfo = 258; -pub const SolverRuleinfo_SOLVER_RULE_PKG_REQUIRES: SolverRuleinfo = 259; -pub const SolverRuleinfo_SOLVER_RULE_PKG_SELF_CONFLICT: SolverRuleinfo = 260; -pub const SolverRuleinfo_SOLVER_RULE_PKG_CONFLICTS: SolverRuleinfo = 261; -pub const SolverRuleinfo_SOLVER_RULE_PKG_SAME_NAME: SolverRuleinfo = 262; -pub const SolverRuleinfo_SOLVER_RULE_PKG_OBSOLETES: SolverRuleinfo = 263; -pub const SolverRuleinfo_SOLVER_RULE_PKG_IMPLICIT_OBSOLETES: SolverRuleinfo = 264; -pub const SolverRuleinfo_SOLVER_RULE_PKG_INSTALLED_OBSOLETES: SolverRuleinfo = 265; -pub const SolverRuleinfo_SOLVER_RULE_PKG_RECOMMENDS: SolverRuleinfo = 266; -pub const SolverRuleinfo_SOLVER_RULE_PKG_CONSTRAINS: SolverRuleinfo = 267; -pub const SolverRuleinfo_SOLVER_RULE_UPDATE: SolverRuleinfo = 512; -pub const SolverRuleinfo_SOLVER_RULE_FEATURE: SolverRuleinfo = 768; -pub const SolverRuleinfo_SOLVER_RULE_JOB: SolverRuleinfo = 1024; -pub const SolverRuleinfo_SOLVER_RULE_JOB_NOTHING_PROVIDES_DEP: SolverRuleinfo = 1025; -pub const SolverRuleinfo_SOLVER_RULE_JOB_PROVIDED_BY_SYSTEM: SolverRuleinfo = 1026; -pub const SolverRuleinfo_SOLVER_RULE_JOB_UNKNOWN_PACKAGE: SolverRuleinfo = 1027; -pub const SolverRuleinfo_SOLVER_RULE_JOB_UNSUPPORTED: SolverRuleinfo = 1028; -pub const SolverRuleinfo_SOLVER_RULE_DISTUPGRADE: SolverRuleinfo = 1280; -pub const SolverRuleinfo_SOLVER_RULE_INFARCH: SolverRuleinfo = 1536; -pub const SolverRuleinfo_SOLVER_RULE_CHOICE: SolverRuleinfo = 1792; -pub const SolverRuleinfo_SOLVER_RULE_LEARNT: SolverRuleinfo = 2048; -pub const SolverRuleinfo_SOLVER_RULE_BEST: SolverRuleinfo = 2304; -pub const SolverRuleinfo_SOLVER_RULE_YUMOBS: SolverRuleinfo = 2560; -pub const SolverRuleinfo_SOLVER_RULE_RECOMMENDS: SolverRuleinfo = 2816; -pub const SolverRuleinfo_SOLVER_RULE_BLACK: SolverRuleinfo = 3072; -pub const SolverRuleinfo_SOLVER_RULE_STRICT_REPO_PRIORITY: SolverRuleinfo = 3328; -cfg_if::cfg_if! { - if #[cfg(all(target_os = "windows", target_env = "msvc"))] { - pub type SolverRuleinfo = libc::c_int; - } else { - pub type SolverRuleinfo = libc::c_uint; - } -} -extern "C" { - pub fn solver_addrule(solv: *mut s_Solver, p: Id, p2: Id, d: Id) -> *mut Rule; -} -extern "C" { - pub fn solver_unifyrules(solv: *mut s_Solver); -} -extern "C" { - pub fn solver_rulecmp(solv: *mut s_Solver, r1: *mut Rule, r2: *mut Rule) -> libc::c_int; -} -extern "C" { - pub fn solver_shrinkrules(solv: *mut s_Solver, nrules: libc::c_int); -} -extern "C" { - pub fn solver_addpkgrulesforsolvable(solv: *mut s_Solver, s: *mut Solvable, m: *mut Map); -} -extern "C" { - pub fn solver_addpkgrulesforweak(solv: *mut s_Solver, m: *mut Map); -} -extern "C" { - pub fn solver_addpkgrulesforlinked(solv: *mut s_Solver, m: *mut Map); -} -extern "C" { - pub fn solver_addpkgrulesforupdaters( - solv: *mut s_Solver, - s: *mut Solvable, - m: *mut Map, - allow_all: libc::c_int, - ); -} -extern "C" { - pub fn solver_addfeaturerule(solv: *mut s_Solver, s: *mut Solvable); -} -extern "C" { - pub fn solver_addupdaterule(solv: *mut s_Solver, s: *mut Solvable); -} -extern "C" { - pub fn solver_addinfarchrules(solv: *mut s_Solver, addedmap: *mut Map); -} -extern "C" { - pub fn solver_createdupmaps(solv: *mut s_Solver); -} -extern "C" { - pub fn solver_freedupmaps(solv: *mut s_Solver); -} -extern "C" { - pub fn solver_addduprules(solv: *mut s_Solver, addedmap: *mut Map); -} -extern "C" { - pub fn solver_addchoicerules(solv: *mut s_Solver); -} -extern "C" { - pub fn solver_disablechoicerules(solv: *mut s_Solver, r: *mut Rule); -} -extern "C" { - pub fn solver_addbestrules( - solv: *mut s_Solver, - havebestinstalljobs: libc::c_int, - haslockjob: libc::c_int, - ); -} -extern "C" { - pub fn solver_addyumobsrules(solv: *mut s_Solver); -} -extern "C" { - pub fn solver_addblackrules(solv: *mut s_Solver); -} -extern "C" { - pub fn solver_addrecommendsrules(solv: *mut s_Solver); -} -extern "C" { - pub fn solver_addstrictrepopriorules(solv: *mut s_Solver, addedmap: *mut Map); -} -extern "C" { - pub fn solver_disablepolicyrules(solv: *mut s_Solver); -} -extern "C" { - pub fn solver_reenablepolicyrules(solv: *mut s_Solver, jobidx: libc::c_int); -} -extern "C" { - pub fn solver_reenablepolicyrules_cleandeps(solv: *mut s_Solver, pkg: Id); -} -extern "C" { - pub fn solver_allruleinfos(solv: *mut s_Solver, rid: Id, rq: *mut Queue) -> libc::c_int; -} -extern "C" { - pub fn solver_ruleinfo( - solv: *mut s_Solver, - rid: Id, - fromp: *mut Id, - top: *mut Id, - depp: *mut Id, - ) -> SolverRuleinfo; -} -extern "C" { - pub fn solver_ruleclass(solv: *mut s_Solver, rid: Id) -> SolverRuleinfo; -} -extern "C" { - pub fn solver_ruleliterals(solv: *mut s_Solver, rid: Id, q: *mut Queue); -} -extern "C" { - pub fn solver_rule2jobidx(solv: *mut s_Solver, rid: Id) -> libc::c_int; -} -extern "C" { - pub fn solver_rule2job(solv: *mut s_Solver, rid: Id, whatp: *mut Id) -> Id; -} -extern "C" { - pub fn solver_rule2solvable(solv: *mut s_Solver, rid: Id) -> Id; -} -extern "C" { - pub fn solver_rule2rules(solv: *mut s_Solver, rid: Id, q: *mut Queue, recursive: libc::c_int); -} -extern "C" { - pub fn solver_rule2pkgrule(solv: *mut s_Solver, rid: Id) -> Id; -} -extern "C" { - pub fn solver_breakorphans(solv: *mut s_Solver); -} -extern "C" { - pub fn solver_check_brokenorphanrules(solv: *mut s_Solver, dq: *mut Queue); -} -extern "C" { - pub fn solver_recordproblem(solv: *mut s_Solver, rid: Id); -} -extern "C" { - pub fn solver_fixproblem(solv: *mut s_Solver, rid: Id); -} -extern "C" { - pub fn solver_autouninstall(solv: *mut s_Solver, start: libc::c_int) -> Id; -} -extern "C" { - pub fn solver_disableproblemset(solv: *mut s_Solver, start: libc::c_int); -} -extern "C" { - pub fn solver_prepare_solutions(solv: *mut s_Solver) -> libc::c_int; -} -extern "C" { - pub fn solver_problem_count(solv: *mut s_Solver) -> libc::c_uint; -} -extern "C" { - pub fn solver_next_problem(solv: *mut s_Solver, problem: Id) -> Id; -} -extern "C" { - pub fn solver_solution_count(solv: *mut s_Solver, problem: Id) -> libc::c_uint; -} -extern "C" { - pub fn solver_next_solution(solv: *mut s_Solver, problem: Id, solution: Id) -> Id; -} -extern "C" { - pub fn solver_solutionelement_count( - solv: *mut s_Solver, - problem: Id, - solution: Id, - ) -> libc::c_uint; -} -extern "C" { - pub fn solver_solutionelement_internalid(solv: *mut s_Solver, problem: Id, solution: Id) -> Id; -} -extern "C" { - pub fn solver_solutionelement_extrajobflags( - solv: *mut s_Solver, - problem: Id, - solution: Id, - ) -> Id; -} -extern "C" { - pub fn solver_next_solutionelement( - solv: *mut s_Solver, - problem: Id, - solution: Id, - element: Id, - p: *mut Id, - rp: *mut Id, - ) -> Id; -} -extern "C" { - pub fn solver_take_solutionelement( - solv: *mut s_Solver, - p: Id, - rp: Id, - extrajobflags: Id, - job: *mut Queue, - ); -} -extern "C" { - pub fn solver_take_solution(solv: *mut s_Solver, problem: Id, solution: Id, job: *mut Queue); -} -extern "C" { - pub fn solver_findproblemrule(solv: *mut s_Solver, problem: Id) -> Id; -} -extern "C" { - pub fn solver_findallproblemrules(solv: *mut s_Solver, problem: Id, rules: *mut Queue); -} -extern "C" { - pub fn solver_problemruleinfo2str( - solv: *mut s_Solver, - type_: SolverRuleinfo, - source: Id, - target: Id, - dep: Id, - ) -> *const libc::c_char; -} -extern "C" { - pub fn solver_problem2str(solv: *mut s_Solver, problem: Id) -> *const libc::c_char; -} -extern "C" { - pub fn solver_solutionelement2str(solv: *mut s_Solver, p: Id, rp: Id) -> *const libc::c_char; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct s_Solver { - pub pool: *mut Pool, - pub job: Queue, - pub solution_callback: ::std::option::Option< - unsafe extern "C" fn(solv: *mut s_Solver, data: *mut libc::c_void) -> libc::c_int, - >, - pub solution_callback_data: *mut libc::c_void, - pub pooljobcnt: libc::c_int, -} -pub type Solver = s_Solver; -extern "C" { - pub fn solver_create(pool: *mut Pool) -> *mut Solver; -} -extern "C" { - pub fn solver_free(solv: *mut Solver); -} -extern "C" { - pub fn solver_solve(solv: *mut Solver, job: *mut Queue) -> libc::c_int; -} -extern "C" { - pub fn solver_create_transaction(solv: *mut Solver) -> *mut Transaction; -} -extern "C" { - pub fn solver_set_flag(solv: *mut Solver, flag: libc::c_int, value: libc::c_int) - -> libc::c_int; -} -extern "C" { - pub fn solver_get_flag(solv: *mut Solver, flag: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn solver_get_decisionlevel(solv: *mut Solver, p: Id) -> libc::c_int; -} -extern "C" { - pub fn solver_get_decisionqueue(solv: *mut Solver, decisionq: *mut Queue); -} -extern "C" { - pub fn solver_get_lastdecisionblocklevel(solv: *mut Solver) -> libc::c_int; -} -extern "C" { - pub fn solver_get_decisionblock(solv: *mut Solver, level: libc::c_int, decisionq: *mut Queue); -} -extern "C" { - pub fn solver_get_orphaned(solv: *mut Solver, orphanedq: *mut Queue); -} -extern "C" { - pub fn solver_get_recommendations( - solv: *mut Solver, - recommendationsq: *mut Queue, - suggestionsq: *mut Queue, - noselected: libc::c_int, - ); -} -extern "C" { - pub fn solver_get_unneeded(solv: *mut Solver, unneededq: *mut Queue, filtered: libc::c_int); -} -extern "C" { - pub fn solver_get_userinstalled(solv: *mut Solver, q: *mut Queue, flags: libc::c_int); -} -extern "C" { - pub fn pool_add_userinstalled_jobs( - pool: *mut Pool, - q: *mut Queue, - job: *mut Queue, - flags: libc::c_int, - ); -} -extern "C" { - pub fn solver_get_cleandeps(solv: *mut Solver, cleandepsq: *mut Queue); -} -extern "C" { - pub fn solver_describe_decision(solv: *mut Solver, p: Id, infop: *mut Id) -> libc::c_int; -} -extern "C" { - pub fn solver_describe_weakdep_decision(solv: *mut Solver, p: Id, whyq: *mut Queue); -} -extern "C" { - pub fn solver_alternatives_count(solv: *mut Solver) -> libc::c_int; -} -extern "C" { - pub fn solver_get_alternative( - solv: *mut Solver, - alternative: Id, - idp: *mut Id, - fromp: *mut Id, - chosenp: *mut Id, - choices: *mut Queue, - levelp: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn solver_calculate_multiversionmap( - pool: *mut Pool, - job: *mut Queue, - multiversionmap: *mut Map, - ); -} -extern "C" { - pub fn solver_calculate_noobsmap(pool: *mut Pool, job: *mut Queue, multiversionmap: *mut Map); -} -extern "C" { - pub fn solver_create_state_maps( - solv: *mut Solver, - installedmap: *mut Map, - conflictsmap: *mut Map, - ); -} -extern "C" { - pub fn solver_calc_duchanges(solv: *mut Solver, mps: *mut DUChanges, nmps: libc::c_int); -} -extern "C" { - pub fn solver_calc_installsizechange(solv: *mut Solver) -> libc::c_int; -} -extern "C" { - pub fn pool_job2solvables(pool: *mut Pool, pkgs: *mut Queue, how: Id, what: Id); -} -extern "C" { - pub fn pool_isemptyupdatejob(pool: *mut Pool, how: Id, what: Id) -> libc::c_int; -} -extern "C" { - pub fn solver_select2str(pool: *mut Pool, select: Id, what: Id) -> *const libc::c_char; -} -extern "C" { - pub fn pool_job2str(pool: *mut Pool, how: Id, what: Id, flagmask: Id) -> *const libc::c_char; -} -extern "C" { - pub fn solver_alternative2str( - solv: *mut Solver, - type_: libc::c_int, - id: Id, - from: Id, - ) -> *const libc::c_char; -} -extern "C" { - pub fn solver_trivial_installable(solv: *mut Solver, pkgs: *mut Queue, res: *mut Queue); -} -extern "C" { - pub fn solver_printruleelement(solv: *mut Solver, type_: libc::c_int, r: *mut Rule, v: Id); -} -extern "C" { - pub fn solver_printrule(solv: *mut Solver, type_: libc::c_int, r: *mut Rule); -} -extern "C" { - pub fn solver_printruleclass(solv: *mut Solver, type_: libc::c_int, r: *mut Rule); -} -extern "C" { - pub fn solver_printproblem(solv: *mut Solver, v: Id); -} -extern "C" { - pub fn solver_printwatches(solv: *mut Solver, type_: libc::c_int); -} -extern "C" { - pub fn solver_printdecisionq(solv: *mut Solver, type_: libc::c_int); -} -extern "C" { - pub fn solver_printdecisions(solv: *mut Solver); -} -extern "C" { - pub fn solver_printproblemruleinfo(solv: *mut Solver, rule: Id); -} -extern "C" { - pub fn solver_printprobleminfo(solv: *mut Solver, problem: Id); -} -extern "C" { - pub fn solver_printcompleteprobleminfo(solv: *mut Solver, problem: Id); -} -extern "C" { - pub fn solver_printsolution(solv: *mut Solver, problem: Id, solution: Id); -} -extern "C" { - pub fn solver_printallsolutions(solv: *mut Solver); -} -extern "C" { - pub fn transaction_print(trans: *mut Transaction); -} -extern "C" { - pub fn solver_printtrivial(solv: *mut Solver); -} -extern "C" { - pub fn selection_make( - pool: *mut Pool, - selection: *mut Queue, - name: *const libc::c_char, - flags: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn selection_make_matchdeps( - pool: *mut Pool, - selection: *mut Queue, - name: *const libc::c_char, - flags: libc::c_int, - keyname: libc::c_int, - marker: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn selection_make_matchdepid( - pool: *mut Pool, - selection: *mut Queue, - dep: Id, - flags: libc::c_int, - keyname: libc::c_int, - marker: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn selection_make_matchsolvable( - pool: *mut Pool, - selection: *mut Queue, - solvid: Id, - flags: libc::c_int, - keyname: libc::c_int, - marker: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn selection_make_matchsolvablelist( - pool: *mut Pool, - selection: *mut Queue, - solvidq: *mut Queue, - flags: libc::c_int, - keyname: libc::c_int, - marker: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn selection_filter(pool: *mut Pool, sel1: *mut Queue, sel2: *mut Queue); -} -extern "C" { - pub fn selection_add(pool: *mut Pool, sel1: *mut Queue, sel2: *mut Queue); -} -extern "C" { - pub fn selection_subtract(pool: *mut Pool, sel1: *mut Queue, sel2: *mut Queue); -} -extern "C" { - pub fn selection_solvables(pool: *mut Pool, selection: *mut Queue, pkgs: *mut Queue); -} -extern "C" { - pub fn pool_selection2str( - pool: *mut Pool, - selection: *mut Queue, - flagmask: Id, - ) -> *const libc::c_char; -} -extern "C" { - pub fn pool_evrcmp_conda( - pool: *const Pool, - evr1: *const libc::c_char, - evr2: *const libc::c_char, - mode: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn solvable_conda_matchversion( - s: *mut Solvable, - version: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn pool_addrelproviders_conda(pool: *mut Pool, name: Id, evr: Id, plist: *mut Queue) -> Id; -} -extern "C" { - pub fn pool_conda_matchspec(pool: *mut Pool, name: *const libc::c_char) -> Id; -} -extern "C" { - pub fn repo_add_solv(repo: *mut Repo, fp: *mut FILE, flags: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn solv_read_userdata( - fp: *mut FILE, - datap: *mut *mut libc::c_uchar, - lenp: *mut libc::c_int, - ) -> libc::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct s_Repowriter { - pub repo: *mut Repo, - pub flags: libc::c_int, - pub repodatastart: libc::c_int, - pub repodataend: libc::c_int, - pub solvablestart: libc::c_int, - pub solvableend: libc::c_int, - pub keyfilter: ::std::option::Option< - unsafe extern "C" fn( - repo: *mut Repo, - key: *mut Repokey, - kfdata: *mut libc::c_void, - ) -> libc::c_int, - >, - pub kfdata: *mut libc::c_void, - pub keyq: *mut Queue, - pub userdata: *mut libc::c_void, - pub userdatalen: libc::c_int, -} -pub type Repowriter = s_Repowriter; -extern "C" { - pub fn repowriter_create(repo: *mut Repo) -> *mut Repowriter; -} -extern "C" { - pub fn repowriter_free(writer: *mut Repowriter) -> *mut Repowriter; -} -extern "C" { - pub fn repowriter_set_flags(writer: *mut Repowriter, flags: libc::c_int); -} -extern "C" { - pub fn repowriter_set_keyfilter( - writer: *mut Repowriter, - keyfilter: ::std::option::Option< - unsafe extern "C" fn( - repo: *mut Repo, - key: *mut Repokey, - kfdata: *mut libc::c_void, - ) -> libc::c_int, - >, - kfdata: *mut libc::c_void, - ); -} -extern "C" { - pub fn repowriter_set_keyqueue(writer: *mut Repowriter, keyq: *mut Queue); -} -extern "C" { - pub fn repowriter_set_repodatarange( - writer: *mut Repowriter, - repodatastart: libc::c_int, - repodataend: libc::c_int, - ); -} -extern "C" { - pub fn repowriter_set_solvablerange( - writer: *mut Repowriter, - solvablestart: libc::c_int, - solvableend: libc::c_int, - ); -} -extern "C" { - pub fn repowriter_set_userdata( - writer: *mut Repowriter, - data: *const libc::c_void, - len: libc::c_int, - ); -} -extern "C" { - pub fn repowriter_write(writer: *mut Repowriter, fp: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn repo_write(repo: *mut Repo, fp: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn repodata_write(data: *mut Repodata, fp: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn repo_write_stdkeyfilter( - repo: *mut Repo, - key: *mut Repokey, - kfdata: *mut libc::c_void, - ) -> libc::c_int; -} -extern "C" { - pub fn repo_write_filtered( - repo: *mut Repo, - fp: *mut FILE, - keyfilter: ::std::option::Option< - unsafe extern "C" fn( - repo: *mut Repo, - key: *mut Repokey, - kfdata: *mut libc::c_void, - ) -> libc::c_int, - >, - kfdata: *mut libc::c_void, - keyq: *mut Queue, - ) -> libc::c_int; -} -extern "C" { - pub fn repodata_write_filtered( - data: *mut Repodata, - fp: *mut FILE, - keyfilter: ::std::option::Option< - unsafe extern "C" fn( - repo: *mut Repo, - key: *mut Repokey, - kfdata: *mut libc::c_void, - ) -> libc::c_int, - >, - kfdata: *mut libc::c_void, - keyq: *mut Queue, - ) -> libc::c_int; -} -extern "C" { - pub fn repo_add_conda(repo: *mut Repo, fp: *mut FILE, flags: libc::c_int) -> libc::c_int; -} +//! Generated file, do not edit by hand, see `crate/tools/src` + +#![allow( + non_upper_case_globals, + non_camel_case_types, + non_snake_case, + dead_code, + clippy::upper_case_acronyms +)] + +pub use libc::FILE; + +pub const SOLV_VERSION_0: u32 = 0; +pub const SOLV_VERSION_1: u32 = 1; +pub const SOLV_VERSION_2: u32 = 2; +pub const SOLV_VERSION_3: u32 = 3; +pub const SOLV_VERSION_4: u32 = 4; +pub const SOLV_VERSION_5: u32 = 5; +pub const SOLV_VERSION_6: u32 = 6; +pub const SOLV_VERSION_7: u32 = 7; +pub const SOLV_VERSION_8: u32 = 8; +pub const SOLV_VERSION_9: u32 = 9; +pub const SOLV_FLAG_PREFIX_POOL: u32 = 4; +pub const SOLV_FLAG_SIZE_BYTES: u32 = 8; +pub const SOLV_FLAG_USERDATA: u32 = 16; +pub const SOLV_FLAG_IDARRAYBLOCK: u32 = 32; +pub const DISTTYPE_RPM: u32 = 0; +pub const DISTTYPE_DEB: u32 = 1; +pub const DISTTYPE_ARCH: u32 = 2; +pub const DISTTYPE_HAIKU: u32 = 3; +pub const DISTTYPE_CONDA: u32 = 4; +pub const SOLV_FATAL: u32 = 1; +pub const SOLV_ERROR: u32 = 2; +pub const SOLV_WARN: u32 = 4; +pub const SOLV_DEBUG_STATS: u32 = 8; +pub const SOLV_DEBUG_RULE_CREATION: u32 = 16; +pub const SOLV_DEBUG_PROPAGATE: u32 = 32; +pub const SOLV_DEBUG_ANALYZE: u32 = 64; +pub const SOLV_DEBUG_UNSOLVABLE: u32 = 128; +pub const SOLV_DEBUG_SOLUTIONS: u32 = 256; +pub const SOLV_DEBUG_POLICY: u32 = 512; +pub const SOLV_DEBUG_RESULT: u32 = 1024; +pub const SOLV_DEBUG_JOB: u32 = 2048; +pub const SOLV_DEBUG_SOLVER: u32 = 4096; +pub const SOLV_DEBUG_TRANSACTION: u32 = 8192; +pub const SOLV_DEBUG_WATCHES: u32 = 16384; +pub const SOLV_DEBUG_TO_STDERR: u32 = 1073741824; +pub const POOL_FLAG_PROMOTEEPOCH: u32 = 1; +pub const POOL_FLAG_FORBIDSELFCONFLICTS: u32 = 2; +pub const POOL_FLAG_OBSOLETEUSESPROVIDES: u32 = 3; +pub const POOL_FLAG_IMPLICITOBSOLETEUSESPROVIDES: u32 = 4; +pub const POOL_FLAG_OBSOLETEUSESCOLORS: u32 = 5; +pub const POOL_FLAG_NOINSTALLEDOBSOLETES: u32 = 6; +pub const POOL_FLAG_HAVEDISTEPOCH: u32 = 7; +pub const POOL_FLAG_NOOBSOLETESMULTIVERSION: u32 = 8; +pub const POOL_FLAG_ADDFILEPROVIDESFILTERED: u32 = 9; +pub const POOL_FLAG_IMPLICITOBSOLETEUSESCOLORS: u32 = 10; +pub const POOL_FLAG_NOWHATPROVIDESAUX: u32 = 11; +pub const POOL_FLAG_WHATPROVIDESWITHDISABLED: u32 = 12; +pub const REL_GT: u32 = 1; +pub const REL_EQ: u32 = 2; +pub const REL_LT: u32 = 4; +pub const REL_AND: u32 = 16; +pub const REL_OR: u32 = 17; +pub const REL_WITH: u32 = 18; +pub const REL_NAMESPACE: u32 = 19; +pub const REL_ARCH: u32 = 20; +pub const REL_FILECONFLICT: u32 = 21; +pub const REL_COND: u32 = 22; +pub const REL_COMPAT: u32 = 23; +pub const REL_KIND: u32 = 24; +pub const REL_MULTIARCH: u32 = 25; +pub const REL_ELSE: u32 = 26; +pub const REL_ERROR: u32 = 27; +pub const REL_WITHOUT: u32 = 28; +pub const REL_UNLESS: u32 = 29; +pub const REL_CONDA: u32 = 30; +pub const SEARCH_STRINGMASK: u32 = 15; +pub const SEARCH_STRING: u32 = 1; +pub const SEARCH_STRINGSTART: u32 = 2; +pub const SEARCH_STRINGEND: u32 = 3; +pub const SEARCH_SUBSTRING: u32 = 4; +pub const SEARCH_GLOB: u32 = 5; +pub const SEARCH_REGEX: u32 = 6; +pub const SEARCH_ERROR: u32 = 15; +pub const SEARCH_NOCASE: u32 = 128; +pub const SEARCH_NO_STORAGE_SOLVABLE: u32 = 256; +pub const SEARCH_SUB: u32 = 512; +pub const SEARCH_ARRAYSENTINEL: u32 = 1024; +pub const SEARCH_DISABLED_REPOS: u32 = 2048; +pub const SEARCH_KEEP_TYPE_DELETED: u32 = 4096; +pub const SEARCH_SKIP_KIND: u32 = 65536; +pub const SEARCH_FILES: u32 = 131072; +pub const SEARCH_CHECKSUMS: u32 = 262144; +pub const SEARCH_SUBSCHEMA: u32 = 1073741824; +pub const SEARCH_THISSOLVID: u32 = 2147483648; +pub const SEARCH_COMPLETE_FILELIST: u32 = 0; +pub const SEARCH_NEXT_KEY: u32 = 1; +pub const SEARCH_NEXT_SOLVABLE: u32 = 2; +pub const SEARCH_STOP: u32 = 3; +pub const SEARCH_ENTERSUB: i32 = -1; +pub const SOLVER_TRANSACTION_IGNORE: u32 = 0; +pub const SOLVER_TRANSACTION_ERASE: u32 = 16; +pub const SOLVER_TRANSACTION_REINSTALLED: u32 = 17; +pub const SOLVER_TRANSACTION_DOWNGRADED: u32 = 18; +pub const SOLVER_TRANSACTION_CHANGED: u32 = 19; +pub const SOLVER_TRANSACTION_UPGRADED: u32 = 20; +pub const SOLVER_TRANSACTION_OBSOLETED: u32 = 21; +pub const SOLVER_TRANSACTION_INSTALL: u32 = 32; +pub const SOLVER_TRANSACTION_REINSTALL: u32 = 33; +pub const SOLVER_TRANSACTION_DOWNGRADE: u32 = 34; +pub const SOLVER_TRANSACTION_CHANGE: u32 = 35; +pub const SOLVER_TRANSACTION_UPGRADE: u32 = 36; +pub const SOLVER_TRANSACTION_OBSOLETES: u32 = 37; +pub const SOLVER_TRANSACTION_MULTIINSTALL: u32 = 48; +pub const SOLVER_TRANSACTION_MULTIREINSTALL: u32 = 49; +pub const SOLVER_TRANSACTION_MAXTYPE: u32 = 63; +pub const SOLVER_TRANSACTION_SHOW_ACTIVE: u32 = 1; +pub const SOLVER_TRANSACTION_SHOW_ALL: u32 = 2; +pub const SOLVER_TRANSACTION_SHOW_OBSOLETES: u32 = 4; +pub const SOLVER_TRANSACTION_SHOW_MULTIINSTALL: u32 = 8; +pub const SOLVER_TRANSACTION_CHANGE_IS_REINSTALL: u32 = 16; +pub const SOLVER_TRANSACTION_MERGE_VENDORCHANGES: u32 = 32; +pub const SOLVER_TRANSACTION_MERGE_ARCHCHANGES: u32 = 64; +pub const SOLVER_TRANSACTION_RPM_ONLY: u32 = 128; +pub const SOLVER_TRANSACTION_KEEP_PSEUDO: u32 = 256; +pub const SOLVER_TRANSACTION_OBSOLETE_IS_UPGRADE: u32 = 512; +pub const SOLVER_TRANSACTION_ARCHCHANGE: u32 = 256; +pub const SOLVER_TRANSACTION_VENDORCHANGE: u32 = 257; +pub const SOLVER_TRANSACTION_KEEP_ORDERDATA: u32 = 1; +pub const SOLVER_TRANSACTION_KEEP_ORDERCYCLES: u32 = 2; +pub const SOLVER_TRANSACTION_KEEP_ORDEREDGES: u32 = 4; +pub const SOLVER_ORDERCYCLE_HARMLESS: u32 = 0; +pub const SOLVER_ORDERCYCLE_NORMAL: u32 = 1; +pub const SOLVER_ORDERCYCLE_CRITICAL: u32 = 2; +pub const SOLVER_RULE_TYPEMASK: u32 = 65280; +pub const SOLVER_SOLUTION_JOB: u32 = 0; +pub const SOLVER_SOLUTION_DISTUPGRADE: i32 = -1; +pub const SOLVER_SOLUTION_INFARCH: i32 = -2; +pub const SOLVER_SOLUTION_BEST: i32 = -3; +pub const SOLVER_SOLUTION_POOLJOB: i32 = -4; +pub const SOLVER_SOLUTION_BLACK: i32 = -5; +pub const SOLVER_SOLUTION_STRICTREPOPRIORITY: i32 = -6; +pub const SOLVER_SOLVABLE: u32 = 1; +pub const SOLVER_SOLVABLE_NAME: u32 = 2; +pub const SOLVER_SOLVABLE_PROVIDES: u32 = 3; +pub const SOLVER_SOLVABLE_ONE_OF: u32 = 4; +pub const SOLVER_SOLVABLE_REPO: u32 = 5; +pub const SOLVER_SOLVABLE_ALL: u32 = 6; +pub const SOLVER_SELECTMASK: u32 = 255; +pub const SOLVER_NOOP: u32 = 0; +pub const SOLVER_INSTALL: u32 = 256; +pub const SOLVER_ERASE: u32 = 512; +pub const SOLVER_UPDATE: u32 = 768; +pub const SOLVER_WEAKENDEPS: u32 = 1024; +pub const SOLVER_MULTIVERSION: u32 = 1280; +pub const SOLVER_LOCK: u32 = 1536; +pub const SOLVER_DISTUPGRADE: u32 = 1792; +pub const SOLVER_VERIFY: u32 = 2048; +pub const SOLVER_DROP_ORPHANED: u32 = 2304; +pub const SOLVER_USERINSTALLED: u32 = 2560; +pub const SOLVER_ALLOWUNINSTALL: u32 = 2816; +pub const SOLVER_FAVOR: u32 = 3072; +pub const SOLVER_DISFAVOR: u32 = 3328; +pub const SOLVER_BLACKLIST: u32 = 3584; +pub const SOLVER_EXCLUDEFROMWEAK: u32 = 4096; +pub const SOLVER_JOBMASK: u32 = 65280; +pub const SOLVER_WEAK: u32 = 65536; +pub const SOLVER_ESSENTIAL: u32 = 131072; +pub const SOLVER_CLEANDEPS: u32 = 262144; +pub const SOLVER_ORUPDATE: u32 = 524288; +pub const SOLVER_FORCEBEST: u32 = 1048576; +pub const SOLVER_TARGETED: u32 = 2097152; +pub const SOLVER_NOTBYUSER: u32 = 4194304; +pub const SOLVER_SETEV: u32 = 16777216; +pub const SOLVER_SETEVR: u32 = 33554432; +pub const SOLVER_SETARCH: u32 = 67108864; +pub const SOLVER_SETVENDOR: u32 = 134217728; +pub const SOLVER_SETREPO: u32 = 268435456; +pub const SOLVER_NOAUTOSET: u32 = 536870912; +pub const SOLVER_SETNAME: u32 = 1073741824; +pub const SOLVER_SETMASK: u32 = 2130706432; +pub const SOLVER_NOOBSOLETES: u32 = 1280; +pub const SOLVER_REASON_UNRELATED: u32 = 0; +pub const SOLVER_REASON_UNIT_RULE: u32 = 1; +pub const SOLVER_REASON_KEEP_INSTALLED: u32 = 2; +pub const SOLVER_REASON_RESOLVE_JOB: u32 = 3; +pub const SOLVER_REASON_UPDATE_INSTALLED: u32 = 4; +pub const SOLVER_REASON_CLEANDEPS_ERASE: u32 = 5; +pub const SOLVER_REASON_RESOLVE: u32 = 6; +pub const SOLVER_REASON_WEAKDEP: u32 = 7; +pub const SOLVER_REASON_RESOLVE_ORPHAN: u32 = 8; +pub const SOLVER_REASON_RECOMMENDED: u32 = 16; +pub const SOLVER_REASON_SUPPLEMENTED: u32 = 17; +pub const SOLVER_FLAG_ALLOW_DOWNGRADE: u32 = 1; +pub const SOLVER_FLAG_ALLOW_ARCHCHANGE: u32 = 2; +pub const SOLVER_FLAG_ALLOW_VENDORCHANGE: u32 = 3; +pub const SOLVER_FLAG_ALLOW_UNINSTALL: u32 = 4; +pub const SOLVER_FLAG_NO_UPDATEPROVIDE: u32 = 5; +pub const SOLVER_FLAG_SPLITPROVIDES: u32 = 6; +pub const SOLVER_FLAG_IGNORE_RECOMMENDED: u32 = 7; +pub const SOLVER_FLAG_ADD_ALREADY_RECOMMENDED: u32 = 8; +pub const SOLVER_FLAG_NO_INFARCHCHECK: u32 = 9; +pub const SOLVER_FLAG_ALLOW_NAMECHANGE: u32 = 10; +pub const SOLVER_FLAG_KEEP_EXPLICIT_OBSOLETES: u32 = 11; +pub const SOLVER_FLAG_BEST_OBEY_POLICY: u32 = 12; +pub const SOLVER_FLAG_NO_AUTOTARGET: u32 = 13; +pub const SOLVER_FLAG_DUP_ALLOW_DOWNGRADE: u32 = 14; +pub const SOLVER_FLAG_DUP_ALLOW_ARCHCHANGE: u32 = 15; +pub const SOLVER_FLAG_DUP_ALLOW_VENDORCHANGE: u32 = 16; +pub const SOLVER_FLAG_DUP_ALLOW_NAMECHANGE: u32 = 17; +pub const SOLVER_FLAG_KEEP_ORPHANS: u32 = 18; +pub const SOLVER_FLAG_BREAK_ORPHANS: u32 = 19; +pub const SOLVER_FLAG_FOCUS_INSTALLED: u32 = 20; +pub const SOLVER_FLAG_YUM_OBSOLETES: u32 = 21; +pub const SOLVER_FLAG_NEED_UPDATEPROVIDE: u32 = 22; +pub const SOLVER_FLAG_URPM_REORDER: u32 = 23; +pub const SOLVER_FLAG_FOCUS_BEST: u32 = 24; +pub const SOLVER_FLAG_STRONG_RECOMMENDS: u32 = 25; +pub const SOLVER_FLAG_INSTALL_ALSO_UPDATES: u32 = 26; +pub const SOLVER_FLAG_ONLY_NAMESPACE_RECOMMENDED: u32 = 27; +pub const SOLVER_FLAG_STRICT_REPO_PRIORITY: u32 = 28; +pub const SOLVER_ALTERNATIVE_TYPE_RULE: u32 = 1; +pub const SOLVER_ALTERNATIVE_TYPE_RECOMMENDS: u32 = 2; +pub const SOLVER_ALTERNATIVE_TYPE_SUGGESTS: u32 = 3; +pub const SELECTION_NAME: u32 = 1; +pub const SELECTION_PROVIDES: u32 = 2; +pub const SELECTION_FILELIST: u32 = 4; +pub const SELECTION_CANON: u32 = 8; +pub const SELECTION_DOTARCH: u32 = 16; +pub const SELECTION_REL: u32 = 32; +pub const SELECTION_GLOB: u32 = 512; +pub const SELECTION_NOCASE: u32 = 2048; +pub const SELECTION_FLAT: u32 = 1024; +pub const SELECTION_SKIP_KIND: u32 = 16384; +pub const SELECTION_MATCH_DEPSTR: u32 = 32768; +pub const SELECTION_INSTALLED_ONLY: u32 = 256; +pub const SELECTION_SOURCE_ONLY: u32 = 4096; +pub const SELECTION_WITH_SOURCE: u32 = 8192; +pub const SELECTION_WITH_DISABLED: u32 = 65536; +pub const SELECTION_WITH_BADARCH: u32 = 131072; +pub const SELECTION_WITH_ALL: u32 = 204800; +pub const SELECTION_REPLACE: u32 = 0; +pub const SELECTION_ADD: u32 = 268435456; +pub const SELECTION_SUBTRACT: u32 = 536870912; +pub const SELECTION_FILTER: u32 = 805306368; +pub const SELECTION_FILTER_KEEP_IFEMPTY: u32 = 1073741824; +pub const SELECTION_FILTER_SWAPPED: u32 = 2147483648; +pub const SELECTION_MODEBITS: u32 = 805306368; +pub const SOLV_ADD_NO_STUBS: u32 = 256; +pub const CONDA_ADD_USE_ONLY_TAR_BZ2: u32 = 256; +pub const CONDA_ADD_WITH_SIGNATUREDATA: u32 = 512; +pub type Stringpool = s_Stringpool; +pub type Pool = s_Pool; +pub type Id = libc::c_int; +pub type Offset = libc::c_uint; +pub type Hashval = libc::c_uint; +pub type Hashtable = *mut Id; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct s_Reldep { + pub name: Id, + pub evr: Id, + pub flags: libc::c_int, +} +pub type Reldep = s_Reldep; +extern "C" { + pub fn pool_str2id(pool: *mut Pool, arg1: *const libc::c_char, arg2: libc::c_int) -> Id; +} +extern "C" { + pub fn pool_strn2id( + pool: *mut Pool, + arg1: *const libc::c_char, + arg2: libc::c_uint, + arg3: libc::c_int, + ) -> Id; +} +extern "C" { + pub fn pool_rel2id( + pool: *mut Pool, + arg1: Id, + arg2: Id, + arg3: libc::c_int, + arg4: libc::c_int, + ) -> Id; +} +extern "C" { + pub fn pool_id2str(pool: *const Pool, arg1: Id) -> *const libc::c_char; +} +extern "C" { + pub fn pool_id2rel(pool: *const Pool, arg1: Id) -> *const libc::c_char; +} +extern "C" { + pub fn pool_id2evr(pool: *const Pool, arg1: Id) -> *const libc::c_char; +} +extern "C" { + pub fn pool_dep2str(pool: *mut Pool, arg1: Id) -> *const libc::c_char; +} +extern "C" { + pub fn pool_shrink_strings(pool: *mut Pool); +} +extern "C" { + pub fn pool_shrink_rels(pool: *mut Pool); +} +extern "C" { + pub fn pool_freeidhashes(pool: *mut Pool); +} +extern "C" { + pub fn pool_resize_rels_hash(pool: *mut Pool, numnew: libc::c_int); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct s_Queue { + pub elements: *mut Id, + pub count: libc::c_int, + pub alloc: *mut Id, + pub left: libc::c_int, +} +pub type Queue = s_Queue; +extern "C" { + pub fn queue_alloc_one(q: *mut Queue); +} +extern "C" { + pub fn queue_alloc_one_head(q: *mut Queue); +} +extern "C" { + pub fn queue_init(q: *mut Queue); +} +extern "C" { + pub fn queue_init_buffer(q: *mut Queue, buf: *mut Id, size: libc::c_int); +} +extern "C" { + pub fn queue_init_clone(target: *mut Queue, source: *const Queue); +} +extern "C" { + pub fn queue_free(q: *mut Queue); +} +extern "C" { + pub fn queue_insert(q: *mut Queue, pos: libc::c_int, id: Id); +} +extern "C" { + pub fn queue_insert2(q: *mut Queue, pos: libc::c_int, id1: Id, id2: Id); +} +extern "C" { + pub fn queue_insertn(q: *mut Queue, pos: libc::c_int, n: libc::c_int, elements: *const Id); +} +extern "C" { + pub fn queue_delete(q: *mut Queue, pos: libc::c_int); +} +extern "C" { + pub fn queue_delete2(q: *mut Queue, pos: libc::c_int); +} +extern "C" { + pub fn queue_deleten(q: *mut Queue, pos: libc::c_int, n: libc::c_int); +} +extern "C" { + pub fn queue_prealloc(q: *mut Queue, n: libc::c_int); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct s_Map { + pub map: *mut libc::c_uchar, + pub size: libc::c_int, +} +pub type Map = s_Map; +extern "C" { + pub fn map_init(m: *mut Map, n: libc::c_int); +} +extern "C" { + pub fn map_init_clone(target: *mut Map, source: *const Map); +} +extern "C" { + pub fn map_grow(m: *mut Map, n: libc::c_int); +} +extern "C" { + pub fn map_free(m: *mut Map); +} +extern "C" { + pub fn map_and(t: *mut Map, s: *const Map); +} +extern "C" { + pub fn map_or(t: *mut Map, s: *const Map); +} +extern "C" { + pub fn map_subtract(t: *mut Map, s: *const Map); +} +extern "C" { + pub fn map_invertall(m: *mut Map); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct s_Solvable { + pub name: Id, + pub arch: Id, + pub evr: Id, + pub vendor: Id, + pub repo: *mut s_Repo, + pub provides: Offset, + pub obsoletes: Offset, + pub conflicts: Offset, + pub requires: Offset, + pub recommends: Offset, + pub suggests: Offset, + pub supplements: Offset, + pub enhances: Offset, +} +pub type Solvable = s_Solvable; +extern "C" { + pub fn solvable_lookup_type(s: *mut Solvable, keyname: Id) -> Id; +} +extern "C" { + pub fn solvable_lookup_id(s: *mut Solvable, keyname: Id) -> Id; +} +extern "C" { + pub fn solvable_lookup_num( + s: *mut Solvable, + keyname: Id, + notfound: libc::c_ulonglong, + ) -> libc::c_ulonglong; +} +extern "C" { + pub fn solvable_lookup_sizek( + s: *mut Solvable, + keyname: Id, + notfound: libc::c_ulonglong, + ) -> libc::c_ulonglong; +} +extern "C" { + pub fn solvable_lookup_str(s: *mut Solvable, keyname: Id) -> *const libc::c_char; +} +extern "C" { + pub fn solvable_lookup_str_poollang(s: *mut Solvable, keyname: Id) -> *const libc::c_char; +} +extern "C" { + pub fn solvable_lookup_str_lang( + s: *mut Solvable, + keyname: Id, + lang: *const libc::c_char, + usebase: libc::c_int, + ) -> *const libc::c_char; +} +extern "C" { + pub fn solvable_lookup_bool(s: *mut Solvable, keyname: Id) -> libc::c_int; +} +extern "C" { + pub fn solvable_lookup_void(s: *mut Solvable, keyname: Id) -> libc::c_int; +} +extern "C" { + pub fn solvable_get_location( + s: *mut Solvable, + medianrp: *mut libc::c_uint, + ) -> *const libc::c_char; +} +extern "C" { + pub fn solvable_lookup_location( + s: *mut Solvable, + medianrp: *mut libc::c_uint, + ) -> *const libc::c_char; +} +extern "C" { + pub fn solvable_lookup_sourcepkg(s: *mut Solvable) -> *const libc::c_char; +} +extern "C" { + pub fn solvable_lookup_bin_checksum( + s: *mut Solvable, + keyname: Id, + typep: *mut Id, + ) -> *const libc::c_uchar; +} +extern "C" { + pub fn solvable_lookup_checksum( + s: *mut Solvable, + keyname: Id, + typep: *mut Id, + ) -> *const libc::c_char; +} +extern "C" { + pub fn solvable_lookup_idarray(s: *mut Solvable, keyname: Id, q: *mut Queue) -> libc::c_int; +} +extern "C" { + pub fn solvable_lookup_deparray( + s: *mut Solvable, + keyname: Id, + q: *mut Queue, + marker: Id, + ) -> libc::c_int; +} +extern "C" { + pub fn solvable_lookup_count(s: *mut Solvable, keyname: Id) -> libc::c_uint; +} +extern "C" { + pub fn solvable_set_id(s: *mut Solvable, keyname: Id, id: Id); +} +extern "C" { + pub fn solvable_set_num(s: *mut Solvable, keyname: Id, num: libc::c_ulonglong); +} +extern "C" { + pub fn solvable_set_str(s: *mut Solvable, keyname: Id, str_: *const libc::c_char); +} +extern "C" { + pub fn solvable_set_poolstr(s: *mut Solvable, keyname: Id, str_: *const libc::c_char); +} +extern "C" { + pub fn solvable_add_poolstr_array(s: *mut Solvable, keyname: Id, str_: *const libc::c_char); +} +extern "C" { + pub fn solvable_add_idarray(s: *mut Solvable, keyname: Id, id: Id); +} +extern "C" { + pub fn solvable_add_deparray(s: *mut Solvable, keyname: Id, dep: Id, marker: Id); +} +extern "C" { + pub fn solvable_set_idarray(s: *mut Solvable, keyname: Id, q: *mut Queue); +} +extern "C" { + pub fn solvable_set_deparray(s: *mut Solvable, keyname: Id, q: *mut Queue, marker: Id); +} +extern "C" { + pub fn solvable_unset(s: *mut Solvable, keyname: Id); +} +extern "C" { + pub fn solvable_identical(s1: *mut Solvable, s2: *mut Solvable) -> libc::c_int; +} +extern "C" { + pub fn solvable_selfprovidedep(s: *mut Solvable) -> Id; +} +extern "C" { + pub fn solvable_matchesdep( + s: *mut Solvable, + keyname: Id, + dep: Id, + marker: libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn solvable_matchessolvable( + s: *mut Solvable, + keyname: Id, + solvid: Id, + depq: *mut Queue, + marker: libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn solvable_matchessolvable_int( + s: *mut Solvable, + keyname: Id, + marker: libc::c_int, + solvid: Id, + solvidmap: *mut Map, + depq: *mut Queue, + missc: *mut Map, + reloff: libc::c_int, + outdepq: *mut Queue, + ) -> libc::c_int; +} +extern "C" { + pub fn solvable_is_irrelevant_patch(s: *mut Solvable, installedmap: *mut Map) -> libc::c_int; +} +extern "C" { + pub fn solvable_trivial_installable_map( + s: *mut Solvable, + installedmap: *mut Map, + conflictsmap: *mut Map, + multiversionmap: *mut Map, + ) -> libc::c_int; +} +extern "C" { + pub fn solvable_trivial_installable_queue( + s: *mut Solvable, + installed: *mut Queue, + multiversionmap: *mut Map, + ) -> libc::c_int; +} +extern "C" { + pub fn solvable_trivial_installable_repo( + s: *mut Solvable, + installed: *mut s_Repo, + multiversionmap: *mut Map, + ) -> libc::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct s_Stringpool { + pub strings: *mut Offset, + pub nstrings: libc::c_int, + pub stringspace: *mut libc::c_char, + pub sstrings: Offset, + pub stringhashtbl: Hashtable, + pub stringhashmask: Hashval, +} +extern "C" { + pub fn stringpool_init(ss: *mut Stringpool, strs: *mut *const libc::c_char); +} +extern "C" { + pub fn stringpool_init_empty(ss: *mut Stringpool); +} +extern "C" { + pub fn stringpool_clone(ss: *mut Stringpool, from: *mut Stringpool); +} +extern "C" { + pub fn stringpool_free(ss: *mut Stringpool); +} +extern "C" { + pub fn stringpool_freehash(ss: *mut Stringpool); +} +extern "C" { + pub fn stringpool_resize_hash(ss: *mut Stringpool, numnew: libc::c_int); +} +extern "C" { + pub fn stringpool_str2id( + ss: *mut Stringpool, + str_: *const libc::c_char, + create: libc::c_int, + ) -> Id; +} +extern "C" { + pub fn stringpool_strn2id( + ss: *mut Stringpool, + str_: *const libc::c_char, + len: libc::c_uint, + create: libc::c_int, + ) -> Id; +} +extern "C" { + pub fn stringpool_shrink(ss: *mut Stringpool); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct s_Datapos { + pub repo: *mut s_Repo, + pub solvid: Id, + pub repodataid: Id, + pub schema: Id, + pub dp: Id, +} +pub type Datapos = s_Datapos; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct s_Pool { + pub appdata: *mut libc::c_void, + pub ss: s_Stringpool, + pub rels: *mut Reldep, + pub nrels: libc::c_int, + pub repos: *mut *mut s_Repo, + pub nrepos: libc::c_int, + pub urepos: libc::c_int, + pub installed: *mut s_Repo, + pub solvables: *mut Solvable, + pub nsolvables: libc::c_int, + pub languages: *mut *const libc::c_char, + pub nlanguages: libc::c_int, + pub disttype: libc::c_int, + pub id2arch: *mut Id, + pub id2color: *mut libc::c_uchar, + pub lastarch: Id, + pub vendormap: Queue, + pub vendorclasses: *mut *const libc::c_char, + pub whatprovides: *mut Offset, + pub whatprovides_rel: *mut Offset, + pub whatprovidesdata: *mut Id, + pub whatprovidesdataoff: Offset, + pub whatprovidesdataleft: libc::c_int, + pub considered: *mut Map, + pub nscallback: ::std::option::Option< + unsafe extern "C" fn(arg1: *mut s_Pool, data: *mut libc::c_void, name: Id, evr: Id) -> Id, + >, + pub nscallbackdata: *mut libc::c_void, + pub debugmask: libc::c_int, + pub debugcallback: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut s_Pool, + data: *mut libc::c_void, + type_: libc::c_int, + str_: *const libc::c_char, + ), + >, + pub debugcallbackdata: *mut libc::c_void, + pub loadcallback: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut s_Pool, + arg2: *mut s_Repodata, + arg3: *mut libc::c_void, + ) -> libc::c_int, + >, + pub loadcallbackdata: *mut libc::c_void, + pub pos: Datapos, + pub pooljobs: Queue, +} +extern "C" { + pub fn pool_create() -> *mut Pool; +} +extern "C" { + pub fn pool_free(pool: *mut Pool); +} +extern "C" { + pub fn pool_freeallrepos(pool: *mut Pool, reuseids: libc::c_int); +} +extern "C" { + pub fn pool_setdebuglevel(pool: *mut Pool, level: libc::c_int); +} +extern "C" { + pub fn pool_setdisttype(pool: *mut Pool, disttype: libc::c_int) -> libc::c_int; +} +extern "C" { + pub fn pool_set_flag(pool: *mut Pool, flag: libc::c_int, value: libc::c_int) -> libc::c_int; +} +extern "C" { + pub fn pool_get_flag(pool: *mut Pool, flag: libc::c_int) -> libc::c_int; +} +extern "C" { + pub fn pool_debug(pool: *mut Pool, type_: libc::c_int, format: *const libc::c_char, ...); +} +extern "C" { + pub fn pool_setdebugcallback( + pool: *mut Pool, + debugcallback: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut s_Pool, + data: *mut libc::c_void, + type_: libc::c_int, + str_: *const libc::c_char, + ), + >, + debugcallbackdata: *mut libc::c_void, + ); +} +extern "C" { + pub fn pool_setdebugmask(pool: *mut Pool, mask: libc::c_int); +} +extern "C" { + pub fn pool_setloadcallback( + pool: *mut Pool, + cb: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut s_Pool, + arg2: *mut s_Repodata, + arg3: *mut libc::c_void, + ) -> libc::c_int, + >, + loadcbdata: *mut libc::c_void, + ); +} +extern "C" { + pub fn pool_setnamespacecallback( + pool: *mut Pool, + cb: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut s_Pool, + arg2: *mut libc::c_void, + arg3: Id, + arg4: Id, + ) -> Id, + >, + nscbdata: *mut libc::c_void, + ); +} +extern "C" { + pub fn pool_flush_namespaceproviders(pool: *mut Pool, ns: Id, evr: Id); +} +extern "C" { + pub fn pool_set_custom_vendorcheck( + pool: *mut Pool, + vendorcheck: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut s_Pool, + arg2: *mut Solvable, + arg3: *mut Solvable, + ) -> libc::c_int, + >, + ); +} +extern "C" { + pub fn pool_get_custom_vendorcheck( + pool: *mut Pool, + ) -> ::std::option::Option< + unsafe extern "C" fn( + pool: *mut s_Pool, + arg1: *mut Solvable, + arg2: *mut Solvable, + ) -> libc::c_int, + >; +} +extern "C" { + pub fn pool_alloctmpspace(pool: *mut Pool, len: libc::c_int) -> *mut libc::c_char; +} +extern "C" { + pub fn pool_freetmpspace(pool: *mut Pool, space: *const libc::c_char); +} +extern "C" { + pub fn pool_tmpjoin( + pool: *mut Pool, + str1: *const libc::c_char, + str2: *const libc::c_char, + str3: *const libc::c_char, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn pool_tmpappend( + pool: *mut Pool, + str1: *const libc::c_char, + str2: *const libc::c_char, + str3: *const libc::c_char, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn pool_bin2hex( + pool: *mut Pool, + buf: *const libc::c_uchar, + len: libc::c_int, + ) -> *const libc::c_char; +} +extern "C" { + pub fn pool_set_installed(pool: *mut Pool, repo: *mut s_Repo); +} +extern "C" { + pub fn pool_error( + pool: *mut Pool, + ret: libc::c_int, + format: *const libc::c_char, + ... + ) -> libc::c_int; +} +extern "C" { + pub fn pool_errstr(pool: *mut Pool) -> *mut libc::c_char; +} +extern "C" { + pub fn pool_set_rootdir(pool: *mut Pool, rootdir: *const libc::c_char); +} +extern "C" { + pub fn pool_get_rootdir(pool: *mut Pool) -> *const libc::c_char; +} +extern "C" { + pub fn pool_prepend_rootdir(pool: *mut Pool, dir: *const libc::c_char) -> *mut libc::c_char; +} +extern "C" { + pub fn pool_prepend_rootdir_tmp( + pool: *mut Pool, + dir: *const libc::c_char, + ) -> *const libc::c_char; +} +extern "C" { + #[doc = " Solvable management"] + pub fn pool_add_solvable(pool: *mut Pool) -> Id; +} +extern "C" { + pub fn pool_add_solvable_block(pool: *mut Pool, count: libc::c_int) -> Id; +} +extern "C" { + pub fn pool_free_solvable_block( + pool: *mut Pool, + start: Id, + count: libc::c_int, + reuseids: libc::c_int, + ); +} +extern "C" { + pub fn pool_solvable2str(pool: *mut Pool, s: *mut Solvable) -> *const libc::c_char; +} +extern "C" { + pub fn pool_set_languages( + pool: *mut Pool, + languages: *mut *const libc::c_char, + nlanguages: libc::c_int, + ); +} +extern "C" { + pub fn pool_id2langid( + pool: *mut Pool, + id: Id, + lang: *const libc::c_char, + create: libc::c_int, + ) -> Id; +} +extern "C" { + pub fn pool_intersect_evrs( + pool: *mut Pool, + pflags: libc::c_int, + pevr: Id, + flags: libc::c_int, + evr: Id, + ) -> libc::c_int; +} +extern "C" { + pub fn pool_match_dep(pool: *mut Pool, d1: Id, d2: Id) -> libc::c_int; +} +extern "C" { + pub fn pool_match_nevr_rel(pool: *mut Pool, s: *mut Solvable, d: Id) -> libc::c_int; +} +extern "C" { + #[doc = " Prepares a pool for solving"] + pub fn pool_createwhatprovides(pool: *mut Pool); +} +extern "C" { + pub fn pool_addfileprovides(pool: *mut Pool); +} +extern "C" { + pub fn pool_addfileprovides_queue(pool: *mut Pool, idq: *mut Queue, idqinst: *mut Queue); +} +extern "C" { + pub fn pool_freewhatprovides(pool: *mut Pool); +} +extern "C" { + pub fn pool_queuetowhatprovides(pool: *mut Pool, q: *mut Queue) -> Id; +} +extern "C" { + pub fn pool_ids2whatprovides(pool: *mut Pool, ids: *mut Id, count: libc::c_int) -> Id; +} +extern "C" { + pub fn pool_searchlazywhatprovidesq(pool: *mut Pool, d: Id) -> Id; +} +extern "C" { + pub fn pool_addrelproviders(pool: *mut Pool, d: Id) -> Id; +} +extern "C" { + pub fn pool_whatmatchesdep( + pool: *mut Pool, + keyname: Id, + dep: Id, + q: *mut Queue, + marker: libc::c_int, + ); +} +extern "C" { + pub fn pool_whatcontainsdep( + pool: *mut Pool, + keyname: Id, + dep: Id, + q: *mut Queue, + marker: libc::c_int, + ); +} +extern "C" { + pub fn pool_whatmatchessolvable( + pool: *mut Pool, + keyname: Id, + solvid: Id, + q: *mut Queue, + marker: libc::c_int, + ); +} +extern "C" { + pub fn pool_set_whatprovides(pool: *mut Pool, id: Id, providers: Id); +} +extern "C" { + pub fn pool_search( + pool: *mut Pool, + p: Id, + key: Id, + match_: *const libc::c_char, + flags: libc::c_int, + callback: ::std::option::Option< + unsafe extern "C" fn( + cbdata: *mut libc::c_void, + s: *mut Solvable, + data: *mut s_Repodata, + key: *mut s_Repokey, + kv: *mut s_KeyValue, + ) -> libc::c_int, + >, + cbdata: *mut libc::c_void, + ); +} +extern "C" { + pub fn pool_clear_pos(pool: *mut Pool); +} +extern "C" { + pub fn pool_lookup_str(pool: *mut Pool, entry: Id, keyname: Id) -> *const libc::c_char; +} +extern "C" { + pub fn pool_lookup_id(pool: *mut Pool, entry: Id, keyname: Id) -> Id; +} +extern "C" { + pub fn pool_lookup_num( + pool: *mut Pool, + entry: Id, + keyname: Id, + notfound: libc::c_ulonglong, + ) -> libc::c_ulonglong; +} +extern "C" { + pub fn pool_lookup_void(pool: *mut Pool, entry: Id, keyname: Id) -> libc::c_int; +} +extern "C" { + pub fn pool_lookup_bin_checksum( + pool: *mut Pool, + entry: Id, + keyname: Id, + typep: *mut Id, + ) -> *const libc::c_uchar; +} +extern "C" { + pub fn pool_lookup_idarray( + pool: *mut Pool, + entry: Id, + keyname: Id, + q: *mut Queue, + ) -> libc::c_int; +} +extern "C" { + pub fn pool_lookup_checksum( + pool: *mut Pool, + entry: Id, + keyname: Id, + typep: *mut Id, + ) -> *const libc::c_char; +} +extern "C" { + pub fn pool_lookup_deltalocation( + pool: *mut Pool, + entry: Id, + medianrp: *mut libc::c_uint, + ) -> *const libc::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct s_DUChanges { + pub path: *const libc::c_char, + pub kbytes: libc::c_longlong, + pub files: libc::c_longlong, + pub flags: libc::c_int, +} +pub type DUChanges = s_DUChanges; +extern "C" { + pub fn pool_create_state_maps( + pool: *mut Pool, + installed: *mut Queue, + installedmap: *mut Map, + conflictsmap: *mut Map, + ); +} +extern "C" { + pub fn pool_calc_duchanges( + pool: *mut Pool, + installedmap: *mut Map, + mps: *mut DUChanges, + nmps: libc::c_int, + ); +} +extern "C" { + pub fn pool_calc_installsizechange(pool: *mut Pool, installedmap: *mut Map) + -> libc::c_longlong; +} +extern "C" { + pub fn pool_add_fileconflicts_deps(pool: *mut Pool, conflicts: *mut Queue); +} +extern "C" { + pub fn pool_trivial_installable_multiversionmap( + pool: *mut Pool, + installedmap: *mut Map, + pkgs: *mut Queue, + res: *mut Queue, + multiversionmap: *mut Map, + ); +} +extern "C" { + pub fn pool_trivial_installable( + pool: *mut Pool, + installedmap: *mut Map, + pkgs: *mut Queue, + res: *mut Queue, + ); +} +extern "C" { + pub fn pool_setarch(arg1: *mut Pool, arg2: *const libc::c_char); +} +extern "C" { + pub fn pool_setarchpolicy(arg1: *mut Pool, arg2: *const libc::c_char); +} +extern "C" { + pub fn pool_arch2color_slow(pool: *mut Pool, arch: Id) -> libc::c_uchar; +} +extern "C" { + #[doc = " malloc\n exits with error message on error"] + pub fn solv_malloc(arg1: usize) -> *mut libc::c_void; +} +extern "C" { + pub fn solv_malloc2(arg1: usize, arg2: usize) -> *mut libc::c_void; +} +extern "C" { + pub fn solv_calloc(arg1: usize, arg2: usize) -> *mut libc::c_void; +} +extern "C" { + pub fn solv_realloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; +} +extern "C" { + pub fn solv_realloc2(arg1: *mut libc::c_void, arg2: usize, arg3: usize) -> *mut libc::c_void; +} +extern "C" { + pub fn solv_extend_realloc( + arg1: *mut libc::c_void, + arg2: usize, + arg3: usize, + arg4: usize, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn solv_free(arg1: *mut libc::c_void) -> *mut libc::c_void; +} +extern "C" { + pub fn solv_strdup(arg1: *const libc::c_char) -> *mut libc::c_char; +} +extern "C" { + pub fn solv_oom(arg1: usize, arg2: usize); +} +extern "C" { + pub fn solv_timems(subtract: libc::c_uint) -> libc::c_uint; +} +extern "C" { + pub fn solv_setcloexec(fd: libc::c_int, state: libc::c_int) -> libc::c_int; +} +extern "C" { + pub fn solv_sort( + base: *mut libc::c_void, + nmemb: usize, + size: usize, + compar: ::std::option::Option< + unsafe extern "C" fn( + arg1: *const libc::c_void, + arg2: *const libc::c_void, + arg3: *mut libc::c_void, + ) -> libc::c_int, + >, + compard: *mut libc::c_void, + ); +} +extern "C" { + pub fn solv_dupjoin( + str1: *const libc::c_char, + str2: *const libc::c_char, + str3: *const libc::c_char, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn solv_dupappend( + str1: *const libc::c_char, + str2: *const libc::c_char, + str3: *const libc::c_char, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn solv_hex2bin( + strp: *mut *const libc::c_char, + buf: *mut libc::c_uchar, + bufl: libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn solv_bin2hex( + buf: *const libc::c_uchar, + l: libc::c_int, + str_: *mut libc::c_char, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn solv_validutf8(buf: *const libc::c_char) -> usize; +} +extern "C" { + pub fn solv_latin1toutf8(buf: *const libc::c_char) -> *mut libc::c_char; +} +extern "C" { + pub fn solv_replacebadutf8( + buf: *const libc::c_char, + replchar: libc::c_int, + ) -> *mut libc::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct s_Dirpool { + pub dirs: *mut Id, + pub ndirs: libc::c_int, + pub dirtraverse: *mut Id, +} +pub type Dirpool = s_Dirpool; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct s_Repokey { + pub name: Id, + pub type_: Id, + pub size: libc::c_uint, + pub storage: libc::c_uint, +} +pub type Repokey = s_Repokey; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct s_Repodata { + pub repodataid: Id, + pub repo: *mut s_Repo, + pub state: libc::c_int, + pub loadcallback: ::std::option::Option, + pub start: libc::c_int, + pub end: libc::c_int, + pub keys: *mut Repokey, + pub nkeys: libc::c_int, + pub keybits: [libc::c_uchar; 32usize], + pub schemata: *mut Id, + pub nschemata: libc::c_int, + pub schemadata: *mut Id, + pub spool: Stringpool, + pub localpool: libc::c_int, + pub dirpool: Dirpool, +} +pub type Repodata = s_Repodata; +extern "C" { + pub fn repodata_initdata(data: *mut Repodata, repo: *mut s_Repo, localpool: libc::c_int); +} +extern "C" { + pub fn repodata_freedata(data: *mut Repodata); +} +extern "C" { + pub fn repodata_free(data: *mut Repodata); +} +extern "C" { + pub fn repodata_empty(data: *mut Repodata, localpool: libc::c_int); +} +extern "C" { + pub fn repodata_load(data: *mut Repodata); +} +extern "C" { + pub fn repodata_key2id(data: *mut Repodata, key: *mut Repokey, create: libc::c_int) -> Id; +} +extern "C" { + pub fn repodata_schema2id(data: *mut Repodata, schema: *mut Id, create: libc::c_int) -> Id; +} +extern "C" { + pub fn repodata_free_schemahash(data: *mut Repodata); +} +extern "C" { + pub fn repodata_search( + data: *mut Repodata, + solvid: Id, + keyname: Id, + flags: libc::c_int, + callback: ::std::option::Option< + unsafe extern "C" fn( + cbdata: *mut libc::c_void, + s: *mut Solvable, + data: *mut Repodata, + key: *mut Repokey, + kv: *mut s_KeyValue, + ) -> libc::c_int, + >, + cbdata: *mut libc::c_void, + ); +} +extern "C" { + pub fn repodata_search_keyskip( + data: *mut Repodata, + solvid: Id, + keyname: Id, + flags: libc::c_int, + keyskip: *mut Id, + callback: ::std::option::Option< + unsafe extern "C" fn( + cbdata: *mut libc::c_void, + s: *mut Solvable, + data: *mut Repodata, + key: *mut Repokey, + kv: *mut s_KeyValue, + ) -> libc::c_int, + >, + cbdata: *mut libc::c_void, + ); +} +extern "C" { + pub fn repodata_search_arrayelement( + data: *mut Repodata, + solvid: Id, + keyname: Id, + flags: libc::c_int, + kv: *mut s_KeyValue, + callback: ::std::option::Option< + unsafe extern "C" fn( + cbdata: *mut libc::c_void, + s: *mut Solvable, + data: *mut Repodata, + key: *mut Repokey, + kv: *mut s_KeyValue, + ) -> libc::c_int, + >, + cbdata: *mut libc::c_void, + ); +} +extern "C" { + pub fn repodata_stringify( + pool: *mut Pool, + data: *mut Repodata, + key: *mut Repokey, + kv: *mut s_KeyValue, + flags: libc::c_int, + ) -> *const libc::c_char; +} +extern "C" { + pub fn repodata_set_filelisttype(data: *mut Repodata, filelisttype: libc::c_int); +} +extern "C" { + pub fn repodata_filelistfilter_matches( + data: *mut Repodata, + str_: *const libc::c_char, + ) -> libc::c_int; +} +extern "C" { + pub fn repodata_free_filelistfilter(data: *mut Repodata); +} +extern "C" { + pub fn repodata_lookup_type(data: *mut Repodata, solvid: Id, keyname: Id) -> Id; +} +extern "C" { + pub fn repodata_lookup_id(data: *mut Repodata, solvid: Id, keyname: Id) -> Id; +} +extern "C" { + pub fn repodata_lookup_str(data: *mut Repodata, solvid: Id, keyname: Id) + -> *const libc::c_char; +} +extern "C" { + pub fn repodata_lookup_num( + data: *mut Repodata, + solvid: Id, + keyname: Id, + notfound: libc::c_ulonglong, + ) -> libc::c_ulonglong; +} +extern "C" { + pub fn repodata_lookup_void(data: *mut Repodata, solvid: Id, keyname: Id) -> libc::c_int; +} +extern "C" { + pub fn repodata_lookup_bin_checksum( + data: *mut Repodata, + solvid: Id, + keyname: Id, + typep: *mut Id, + ) -> *const libc::c_uchar; +} +extern "C" { + pub fn repodata_lookup_idarray( + data: *mut Repodata, + solvid: Id, + keyname: Id, + q: *mut Queue, + ) -> libc::c_int; +} +extern "C" { + pub fn repodata_lookup_binary( + data: *mut Repodata, + solvid: Id, + keyname: Id, + lenp: *mut libc::c_int, + ) -> *const libc::c_void; +} +extern "C" { + pub fn repodata_lookup_count(data: *mut Repodata, solvid: Id, keyname: Id) -> libc::c_uint; +} +extern "C" { + pub fn repodata_lookup_packed_dirstrarray( + data: *mut Repodata, + solvid: Id, + keyname: Id, + ) -> *const libc::c_uchar; +} +extern "C" { + pub fn repodata_fill_keyskip(data: *mut Repodata, solvid: Id, keyskip: *mut Id) -> *mut Id; +} +extern "C" { + pub fn repodata_extend(data: *mut Repodata, p: Id); +} +extern "C" { + pub fn repodata_extend_block(data: *mut Repodata, p: Id, num: libc::c_int); +} +extern "C" { + pub fn repodata_shrink(data: *mut Repodata, end: libc::c_int); +} +extern "C" { + pub fn repodata_internalize(data: *mut Repodata); +} +extern "C" { + pub fn repodata_new_handle(data: *mut Repodata) -> Id; +} +extern "C" { + pub fn repodata_set_void(data: *mut Repodata, solvid: Id, keyname: Id); +} +extern "C" { + pub fn repodata_set_num(data: *mut Repodata, solvid: Id, keyname: Id, num: libc::c_ulonglong); +} +extern "C" { + pub fn repodata_set_id(data: *mut Repodata, solvid: Id, keyname: Id, id: Id); +} +extern "C" { + pub fn repodata_set_str( + data: *mut Repodata, + solvid: Id, + keyname: Id, + str_: *const libc::c_char, + ); +} +extern "C" { + pub fn repodata_set_binary( + data: *mut Repodata, + solvid: Id, + keyname: Id, + buf: *mut libc::c_void, + len: libc::c_int, + ); +} +extern "C" { + pub fn repodata_set_poolstr( + data: *mut Repodata, + solvid: Id, + keyname: Id, + str_: *const libc::c_char, + ); +} +extern "C" { + pub fn repodata_set_constant( + data: *mut Repodata, + solvid: Id, + keyname: Id, + constant: libc::c_uint, + ); +} +extern "C" { + pub fn repodata_set_constantid(data: *mut Repodata, solvid: Id, keyname: Id, id: Id); +} +extern "C" { + pub fn repodata_set_bin_checksum( + data: *mut Repodata, + solvid: Id, + keyname: Id, + type_: Id, + buf: *const libc::c_uchar, + ); +} +extern "C" { + pub fn repodata_set_checksum( + data: *mut Repodata, + solvid: Id, + keyname: Id, + type_: Id, + str_: *const libc::c_char, + ); +} +extern "C" { + pub fn repodata_set_idarray(data: *mut Repodata, solvid: Id, keyname: Id, q: *mut Queue); +} +extern "C" { + pub fn repodata_add_dirnumnum( + data: *mut Repodata, + solvid: Id, + keyname: Id, + dir: Id, + num: Id, + num2: Id, + ); +} +extern "C" { + pub fn repodata_add_dirstr( + data: *mut Repodata, + solvid: Id, + keyname: Id, + dir: Id, + str_: *const libc::c_char, + ); +} +extern "C" { + pub fn repodata_free_dircache(data: *mut Repodata); +} +extern "C" { + pub fn repodata_add_idarray(data: *mut Repodata, solvid: Id, keyname: Id, id: Id); +} +extern "C" { + pub fn repodata_add_poolstr_array( + data: *mut Repodata, + solvid: Id, + keyname: Id, + str_: *const libc::c_char, + ); +} +extern "C" { + pub fn repodata_add_fixarray(data: *mut Repodata, solvid: Id, keyname: Id, ghandle: Id); +} +extern "C" { + pub fn repodata_add_flexarray(data: *mut Repodata, solvid: Id, keyname: Id, ghandle: Id); +} +extern "C" { + pub fn repodata_set_kv( + data: *mut Repodata, + solvid: Id, + keyname: Id, + keytype: Id, + kv: *mut s_KeyValue, + ); +} +extern "C" { + pub fn repodata_unset(data: *mut Repodata, solvid: Id, keyname: Id); +} +extern "C" { + pub fn repodata_unset_uninternalized(data: *mut Repodata, solvid: Id, keyname: Id); +} +extern "C" { + pub fn repodata_merge_attrs(data: *mut Repodata, dest: Id, src: Id); +} +extern "C" { + pub fn repodata_merge_some_attrs( + data: *mut Repodata, + dest: Id, + src: Id, + keyidmap: *mut Map, + overwrite: libc::c_int, + ); +} +extern "C" { + pub fn repodata_swap_attrs(data: *mut Repodata, dest: Id, src: Id); +} +extern "C" { + pub fn repodata_create_stubs(data: *mut Repodata) -> *mut Repodata; +} +extern "C" { + pub fn repodata_disable_paging(data: *mut Repodata); +} +extern "C" { + pub fn repodata_globalize_id(data: *mut Repodata, id: Id, create: libc::c_int) -> Id; +} +extern "C" { + pub fn repodata_localize_id(data: *mut Repodata, id: Id, create: libc::c_int) -> Id; +} +extern "C" { + pub fn repodata_translate_id( + data: *mut Repodata, + fromdata: *mut Repodata, + id: Id, + create: libc::c_int, + ) -> Id; +} +extern "C" { + pub fn repodata_translate_dir_slow( + data: *mut Repodata, + fromdata: *mut Repodata, + dir: Id, + create: libc::c_int, + cache: *mut Id, + ) -> Id; +} +extern "C" { + pub fn repodata_str2dir( + data: *mut Repodata, + dir: *const libc::c_char, + create: libc::c_int, + ) -> Id; +} +extern "C" { + pub fn repodata_dir2str( + data: *mut Repodata, + did: Id, + suf: *const libc::c_char, + ) -> *const libc::c_char; +} +extern "C" { + pub fn repodata_chk2str( + data: *mut Repodata, + type_: Id, + buf: *const libc::c_uchar, + ) -> *const libc::c_char; +} +extern "C" { + pub fn repodata_set_location( + data: *mut Repodata, + solvid: Id, + medianr: libc::c_int, + dir: *const libc::c_char, + file: *const libc::c_char, + ); +} +extern "C" { + pub fn repodata_set_deltalocation( + data: *mut Repodata, + handle: Id, + medianr: libc::c_int, + dir: *const libc::c_char, + file: *const libc::c_char, + ); +} +extern "C" { + pub fn repodata_set_sourcepkg(data: *mut Repodata, solvid: Id, sourcepkg: *const libc::c_char); +} +extern "C" { + pub fn repodata_lookup_kv_uninternalized( + data: *mut Repodata, + solvid: Id, + keyname: Id, + kv: *mut s_KeyValue, + ) -> *mut Repokey; +} +extern "C" { + pub fn repodata_search_uninternalized( + data: *mut Repodata, + solvid: Id, + keyname: Id, + flags: libc::c_int, + callback: ::std::option::Option< + unsafe extern "C" fn( + cbdata: *mut libc::c_void, + s: *mut Solvable, + data: *mut Repodata, + key: *mut Repokey, + kv: *mut s_KeyValue, + ) -> libc::c_int, + >, + cbdata: *mut libc::c_void, + ); +} +extern "C" { + pub fn repodata_memused(data: *mut Repodata) -> libc::c_uint; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct s_KeyValue { + pub id: Id, + pub str_: *const libc::c_char, + pub num: libc::c_uint, + pub num2: libc::c_uint, + pub entry: libc::c_int, + pub eof: libc::c_int, + pub parent: *mut s_KeyValue, +} +pub type KeyValue = s_KeyValue; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct s_Datamatcher { + pub flags: libc::c_int, + pub match_: *const libc::c_char, + pub matchdata: *mut libc::c_void, + pub error: libc::c_int, +} +pub type Datamatcher = s_Datamatcher; +extern "C" { + pub fn datamatcher_init( + ma: *mut Datamatcher, + match_: *const libc::c_char, + flags: libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn datamatcher_free(ma: *mut Datamatcher); +} +extern "C" { + pub fn datamatcher_match(ma: *mut Datamatcher, str_: *const libc::c_char) -> libc::c_int; +} +extern "C" { + pub fn datamatcher_checkbasename( + ma: *mut Datamatcher, + str_: *const libc::c_char, + ) -> libc::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct s_Dataiterator { + pub state: libc::c_int, + pub flags: libc::c_int, + pub pool: *mut Pool, + pub repo: *mut s_Repo, + pub data: *mut s_Repodata, + pub dp: *mut libc::c_uchar, + pub ddp: *mut libc::c_uchar, + pub idp: *mut Id, + pub keyp: *mut Id, + pub key: *mut s_Repokey, + pub kv: KeyValue, + pub matcher: Datamatcher, + pub keyname: Id, + pub repodataid: Id, + pub solvid: Id, + pub repoid: Id, + pub keynames: [Id; 4usize], + pub nkeynames: libc::c_int, + pub rootlevel: libc::c_int, + pub parents: [s_Dataiterator_di_parent; 3usize], + pub nparents: libc::c_int, + pub vert_ddp: *mut libc::c_uchar, + pub vert_off: Id, + pub vert_len: Id, + pub vert_storestate: Id, + pub dupstr: *mut libc::c_char, + pub dupstrn: libc::c_int, + pub keyskip: *mut Id, + pub oldkeyskip: *mut Id, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct s_Dataiterator_di_parent { + pub kv: KeyValue, + pub dp: *mut libc::c_uchar, + pub keyp: *mut Id, +} +pub type Dataiterator = s_Dataiterator; +extern "C" { + pub fn dataiterator_init( + di: *mut Dataiterator, + pool: *mut Pool, + repo: *mut s_Repo, + p: Id, + keyname: Id, + match_: *const libc::c_char, + flags: libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn dataiterator_init_clone(di: *mut Dataiterator, from: *mut Dataiterator); +} +extern "C" { + pub fn dataiterator_set_search(di: *mut Dataiterator, repo: *mut s_Repo, p: Id); +} +extern "C" { + pub fn dataiterator_set_keyname(di: *mut Dataiterator, keyname: Id); +} +extern "C" { + pub fn dataiterator_set_match( + di: *mut Dataiterator, + match_: *const libc::c_char, + flags: libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn dataiterator_prepend_keyname(di: *mut Dataiterator, keyname: Id); +} +extern "C" { + pub fn dataiterator_free(di: *mut Dataiterator); +} +extern "C" { + pub fn dataiterator_step(di: *mut Dataiterator) -> libc::c_int; +} +extern "C" { + pub fn dataiterator_setpos(di: *mut Dataiterator); +} +extern "C" { + pub fn dataiterator_setpos_parent(di: *mut Dataiterator); +} +extern "C" { + pub fn dataiterator_match(di: *mut Dataiterator, ma: *mut Datamatcher) -> libc::c_int; +} +extern "C" { + pub fn dataiterator_skip_attribute(di: *mut Dataiterator); +} +extern "C" { + pub fn dataiterator_skip_solvable(di: *mut Dataiterator); +} +extern "C" { + pub fn dataiterator_skip_repo(di: *mut Dataiterator); +} +extern "C" { + pub fn dataiterator_jump_to_solvid(di: *mut Dataiterator, solvid: Id); +} +extern "C" { + pub fn dataiterator_jump_to_repo(di: *mut Dataiterator, repo: *mut s_Repo); +} +extern "C" { + pub fn dataiterator_entersub(di: *mut Dataiterator); +} +extern "C" { + pub fn dataiterator_clonepos(di: *mut Dataiterator, from: *mut Dataiterator); +} +extern "C" { + pub fn dataiterator_seek(di: *mut Dataiterator, whence: libc::c_int); +} +extern "C" { + pub fn dataiterator_strdup(di: *mut Dataiterator); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct s_Repo { + pub name: *const libc::c_char, + pub repoid: Id, + pub appdata: *mut libc::c_void, + pub pool: *mut Pool, + pub start: libc::c_int, + pub end: libc::c_int, + pub nsolvables: libc::c_int, + pub disabled: libc::c_int, + pub priority: libc::c_int, + pub subpriority: libc::c_int, + pub idarraydata: *mut Id, + pub idarraysize: libc::c_int, + pub nrepodata: libc::c_int, + pub rpmdbid: *mut Id, +} +pub type Repo = s_Repo; +extern "C" { + pub fn repo_create(pool: *mut Pool, name: *const libc::c_char) -> *mut Repo; +} +extern "C" { + pub fn repo_free(repo: *mut Repo, reuseids: libc::c_int); +} +extern "C" { + pub fn repo_empty(repo: *mut Repo, reuseids: libc::c_int); +} +extern "C" { + pub fn repo_freedata(repo: *mut Repo); +} +extern "C" { + pub fn repo_add_solvable(repo: *mut Repo) -> Id; +} +extern "C" { + pub fn repo_add_solvable_block(repo: *mut Repo, count: libc::c_int) -> Id; +} +extern "C" { + pub fn repo_free_solvable(repo: *mut Repo, p: Id, reuseids: libc::c_int); +} +extern "C" { + pub fn repo_free_solvable_block( + repo: *mut Repo, + start: Id, + count: libc::c_int, + reuseids: libc::c_int, + ); +} +extern "C" { + pub fn repo_sidedata_create(repo: *mut Repo, size: usize) -> *mut libc::c_void; +} +extern "C" { + pub fn repo_sidedata_extend( + repo: *mut Repo, + b: *mut libc::c_void, + size: usize, + p: Id, + count: libc::c_int, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn repo_add_solvable_block_before( + repo: *mut Repo, + count: libc::c_int, + beforerepo: *mut Repo, + ) -> Id; +} +extern "C" { + pub fn repo_addid(repo: *mut Repo, olddeps: Offset, id: Id) -> Offset; +} +extern "C" { + pub fn repo_addid_dep(repo: *mut Repo, olddeps: Offset, id: Id, marker: Id) -> Offset; +} +extern "C" { + pub fn repo_reserve_ids(repo: *mut Repo, olddeps: Offset, num: libc::c_int) -> Offset; +} +extern "C" { + pub fn repo_add_repodata(repo: *mut Repo, flags: libc::c_int) -> *mut Repodata; +} +extern "C" { + pub fn repo_id2repodata(repo: *mut Repo, id: Id) -> *mut Repodata; +} +extern "C" { + pub fn repo_last_repodata(repo: *mut Repo) -> *mut Repodata; +} +extern "C" { + pub fn repo_search( + repo: *mut Repo, + p: Id, + key: Id, + match_: *const libc::c_char, + flags: libc::c_int, + callback: ::std::option::Option< + unsafe extern "C" fn( + cbdata: *mut libc::c_void, + s: *mut Solvable, + data: *mut Repodata, + key: *mut Repokey, + kv: *mut KeyValue, + ) -> libc::c_int, + >, + cbdata: *mut libc::c_void, + ); +} +extern "C" { + pub fn repo_lookup_repodata(repo: *mut Repo, entry: Id, keyname: Id) -> *mut Repodata; +} +extern "C" { + pub fn repo_lookup_repodata_opt(repo: *mut Repo, entry: Id, keyname: Id) -> *mut Repodata; +} +extern "C" { + pub fn repo_lookup_filelist_repodata( + repo: *mut Repo, + entry: Id, + matcher: *mut Datamatcher, + ) -> *mut Repodata; +} +extern "C" { + pub fn repo_lookup_type(repo: *mut Repo, entry: Id, keyname: Id) -> Id; +} +extern "C" { + pub fn repo_lookup_str(repo: *mut Repo, entry: Id, keyname: Id) -> *const libc::c_char; +} +extern "C" { + pub fn repo_lookup_num( + repo: *mut Repo, + entry: Id, + keyname: Id, + notfound: libc::c_ulonglong, + ) -> libc::c_ulonglong; +} +extern "C" { + pub fn repo_lookup_id(repo: *mut Repo, entry: Id, keyname: Id) -> Id; +} +extern "C" { + pub fn repo_lookup_idarray( + repo: *mut Repo, + entry: Id, + keyname: Id, + q: *mut Queue, + ) -> libc::c_int; +} +extern "C" { + pub fn repo_lookup_deparray( + repo: *mut Repo, + entry: Id, + keyname: Id, + q: *mut Queue, + marker: Id, + ) -> libc::c_int; +} +extern "C" { + pub fn repo_lookup_void(repo: *mut Repo, entry: Id, keyname: Id) -> libc::c_int; +} +extern "C" { + pub fn repo_lookup_checksum( + repo: *mut Repo, + entry: Id, + keyname: Id, + typep: *mut Id, + ) -> *const libc::c_char; +} +extern "C" { + pub fn repo_lookup_bin_checksum( + repo: *mut Repo, + entry: Id, + keyname: Id, + typep: *mut Id, + ) -> *const libc::c_uchar; +} +extern "C" { + pub fn repo_lookup_binary( + repo: *mut Repo, + entry: Id, + keyname: Id, + lenp: *mut libc::c_int, + ) -> *const libc::c_void; +} +extern "C" { + pub fn repo_lookup_count(repo: *mut Repo, entry: Id, keyname: Id) -> libc::c_uint; +} +extern "C" { + pub fn solv_depmarker(keyname: Id, marker: Id) -> Id; +} +extern "C" { + pub fn repo_set_id(repo: *mut Repo, p: Id, keyname: Id, id: Id); +} +extern "C" { + pub fn repo_set_num(repo: *mut Repo, p: Id, keyname: Id, num: libc::c_ulonglong); +} +extern "C" { + pub fn repo_set_str(repo: *mut Repo, p: Id, keyname: Id, str_: *const libc::c_char); +} +extern "C" { + pub fn repo_set_poolstr(repo: *mut Repo, p: Id, keyname: Id, str_: *const libc::c_char); +} +extern "C" { + pub fn repo_add_poolstr_array(repo: *mut Repo, p: Id, keyname: Id, str_: *const libc::c_char); +} +extern "C" { + pub fn repo_add_idarray(repo: *mut Repo, p: Id, keyname: Id, id: Id); +} +extern "C" { + pub fn repo_add_deparray(repo: *mut Repo, p: Id, keyname: Id, dep: Id, marker: Id); +} +extern "C" { + pub fn repo_set_idarray(repo: *mut Repo, p: Id, keyname: Id, q: *mut Queue); +} +extern "C" { + pub fn repo_set_deparray(repo: *mut Repo, p: Id, keyname: Id, q: *mut Queue, marker: Id); +} +extern "C" { + pub fn repo_unset(repo: *mut Repo, p: Id, keyname: Id); +} +extern "C" { + pub fn repo_internalize(repo: *mut Repo); +} +extern "C" { + pub fn repo_disable_paging(repo: *mut Repo); +} +extern "C" { + pub fn repo_create_keyskip(repo: *mut Repo, entry: Id, oldkeyskip: *mut *mut Id) -> *mut Id; +} +extern "C" { + pub fn repo_fix_supplements( + repo: *mut Repo, + provides: Offset, + supplements: Offset, + freshens: Offset, + ) -> Offset; +} +extern "C" { + pub fn repo_fix_conflicts(repo: *mut Repo, conflicts: Offset) -> Offset; +} +extern "C" { + pub fn repo_rewrite_suse_deps(s: *mut Solvable, freshens: Offset); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct s_Transaction { + pub pool: *mut s_Pool, + pub steps: Queue, +} +pub type Transaction = s_Transaction; +extern "C" { + pub fn transaction_create(pool: *mut s_Pool) -> *mut Transaction; +} +extern "C" { + pub fn transaction_create_decisionq( + pool: *mut s_Pool, + decisionq: *mut Queue, + multiversionmap: *mut Map, + ) -> *mut Transaction; +} +extern "C" { + pub fn transaction_create_clone(srctrans: *mut Transaction) -> *mut Transaction; +} +extern "C" { + pub fn transaction_free(trans: *mut Transaction); +} +extern "C" { + pub fn transaction_obs_pkg(trans: *mut Transaction, p: Id) -> Id; +} +extern "C" { + pub fn transaction_all_obs_pkgs(trans: *mut Transaction, p: Id, pkgs: *mut Queue); +} +extern "C" { + pub fn transaction_type(trans: *mut Transaction, p: Id, mode: libc::c_int) -> Id; +} +extern "C" { + pub fn transaction_classify(trans: *mut Transaction, mode: libc::c_int, classes: *mut Queue); +} +extern "C" { + pub fn transaction_classify_pkgs( + trans: *mut Transaction, + mode: libc::c_int, + type_: Id, + from: Id, + to: Id, + pkgs: *mut Queue, + ); +} +extern "C" { + pub fn transaction_installedresult( + trans: *mut Transaction, + installedq: *mut Queue, + ) -> libc::c_int; +} +extern "C" { + pub fn transaction_calc_installsizechange(trans: *mut Transaction) -> libc::c_longlong; +} +extern "C" { + pub fn transaction_calc_duchanges( + trans: *mut Transaction, + mps: *mut s_DUChanges, + nmps: libc::c_int, + ); +} +extern "C" { + pub fn transaction_order(trans: *mut Transaction, flags: libc::c_int); +} +extern "C" { + pub fn transaction_order_add_choices( + trans: *mut Transaction, + chosen: Id, + choices: *mut Queue, + ) -> libc::c_int; +} +extern "C" { + pub fn transaction_add_obsoleted(trans: *mut Transaction); +} +extern "C" { + pub fn transaction_check_order(trans: *mut Transaction); +} +extern "C" { + pub fn transaction_order_get_cycleids( + trans: *mut Transaction, + q: *mut Queue, + minseverity: libc::c_int, + ); +} +extern "C" { + pub fn transaction_order_get_cycle( + trans: *mut Transaction, + cid: Id, + q: *mut Queue, + ) -> libc::c_int; +} +extern "C" { + pub fn transaction_order_get_edges( + trans: *mut Transaction, + p: Id, + q: *mut Queue, + unbroken: libc::c_int, + ); +} +extern "C" { + pub fn transaction_free_orderdata(trans: *mut Transaction); +} +extern "C" { + pub fn transaction_clone_orderdata(trans: *mut Transaction, srctrans: *mut Transaction); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct s_Rule { + pub p: Id, + pub d: Id, + pub w1: Id, + pub w2: Id, + pub n1: Id, + pub n2: Id, +} +pub type Rule = s_Rule; +pub const SolverRuleinfo_SOLVER_RULE_UNKNOWN: SolverRuleinfo = 0; +pub const SolverRuleinfo_SOLVER_RULE_PKG: SolverRuleinfo = 256; +pub const SolverRuleinfo_SOLVER_RULE_PKG_NOT_INSTALLABLE: SolverRuleinfo = 257; +pub const SolverRuleinfo_SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP: SolverRuleinfo = 258; +pub const SolverRuleinfo_SOLVER_RULE_PKG_REQUIRES: SolverRuleinfo = 259; +pub const SolverRuleinfo_SOLVER_RULE_PKG_SELF_CONFLICT: SolverRuleinfo = 260; +pub const SolverRuleinfo_SOLVER_RULE_PKG_CONFLICTS: SolverRuleinfo = 261; +pub const SolverRuleinfo_SOLVER_RULE_PKG_SAME_NAME: SolverRuleinfo = 262; +pub const SolverRuleinfo_SOLVER_RULE_PKG_OBSOLETES: SolverRuleinfo = 263; +pub const SolverRuleinfo_SOLVER_RULE_PKG_IMPLICIT_OBSOLETES: SolverRuleinfo = 264; +pub const SolverRuleinfo_SOLVER_RULE_PKG_INSTALLED_OBSOLETES: SolverRuleinfo = 265; +pub const SolverRuleinfo_SOLVER_RULE_PKG_RECOMMENDS: SolverRuleinfo = 266; +pub const SolverRuleinfo_SOLVER_RULE_PKG_CONSTRAINS: SolverRuleinfo = 267; +pub const SolverRuleinfo_SOLVER_RULE_UPDATE: SolverRuleinfo = 512; +pub const SolverRuleinfo_SOLVER_RULE_FEATURE: SolverRuleinfo = 768; +pub const SolverRuleinfo_SOLVER_RULE_JOB: SolverRuleinfo = 1024; +pub const SolverRuleinfo_SOLVER_RULE_JOB_NOTHING_PROVIDES_DEP: SolverRuleinfo = 1025; +pub const SolverRuleinfo_SOLVER_RULE_JOB_PROVIDED_BY_SYSTEM: SolverRuleinfo = 1026; +pub const SolverRuleinfo_SOLVER_RULE_JOB_UNKNOWN_PACKAGE: SolverRuleinfo = 1027; +pub const SolverRuleinfo_SOLVER_RULE_JOB_UNSUPPORTED: SolverRuleinfo = 1028; +pub const SolverRuleinfo_SOLVER_RULE_DISTUPGRADE: SolverRuleinfo = 1280; +pub const SolverRuleinfo_SOLVER_RULE_INFARCH: SolverRuleinfo = 1536; +pub const SolverRuleinfo_SOLVER_RULE_CHOICE: SolverRuleinfo = 1792; +pub const SolverRuleinfo_SOLVER_RULE_LEARNT: SolverRuleinfo = 2048; +pub const SolverRuleinfo_SOLVER_RULE_BEST: SolverRuleinfo = 2304; +pub const SolverRuleinfo_SOLVER_RULE_YUMOBS: SolverRuleinfo = 2560; +pub const SolverRuleinfo_SOLVER_RULE_RECOMMENDS: SolverRuleinfo = 2816; +pub const SolverRuleinfo_SOLVER_RULE_BLACK: SolverRuleinfo = 3072; +pub const SolverRuleinfo_SOLVER_RULE_STRICT_REPO_PRIORITY: SolverRuleinfo = 3328; +cfg_if::cfg_if! { + if #[cfg(all(target_os = "windows", target_env = "msvc"))] { + pub type SolverRuleinfo = libc::c_int; + } else { + pub type SolverRuleinfo = libc::c_uint; + } +} +extern "C" { + pub fn solver_addrule(solv: *mut s_Solver, p: Id, p2: Id, d: Id) -> *mut Rule; +} +extern "C" { + pub fn solver_unifyrules(solv: *mut s_Solver); +} +extern "C" { + pub fn solver_rulecmp(solv: *mut s_Solver, r1: *mut Rule, r2: *mut Rule) -> libc::c_int; +} +extern "C" { + pub fn solver_shrinkrules(solv: *mut s_Solver, nrules: libc::c_int); +} +extern "C" { + pub fn solver_addpkgrulesforsolvable(solv: *mut s_Solver, s: *mut Solvable, m: *mut Map); +} +extern "C" { + pub fn solver_addpkgrulesforweak(solv: *mut s_Solver, m: *mut Map); +} +extern "C" { + pub fn solver_addpkgrulesforlinked(solv: *mut s_Solver, m: *mut Map); +} +extern "C" { + pub fn solver_addpkgrulesforupdaters( + solv: *mut s_Solver, + s: *mut Solvable, + m: *mut Map, + allow_all: libc::c_int, + ); +} +extern "C" { + pub fn solver_addfeaturerule(solv: *mut s_Solver, s: *mut Solvable); +} +extern "C" { + pub fn solver_addupdaterule(solv: *mut s_Solver, s: *mut Solvable); +} +extern "C" { + pub fn solver_addinfarchrules(solv: *mut s_Solver, addedmap: *mut Map); +} +extern "C" { + pub fn solver_createdupmaps(solv: *mut s_Solver); +} +extern "C" { + pub fn solver_freedupmaps(solv: *mut s_Solver); +} +extern "C" { + pub fn solver_addduprules(solv: *mut s_Solver, addedmap: *mut Map); +} +extern "C" { + pub fn solver_addchoicerules(solv: *mut s_Solver); +} +extern "C" { + pub fn solver_disablechoicerules(solv: *mut s_Solver, r: *mut Rule); +} +extern "C" { + pub fn solver_addbestrules( + solv: *mut s_Solver, + havebestinstalljobs: libc::c_int, + haslockjob: libc::c_int, + ); +} +extern "C" { + pub fn solver_addyumobsrules(solv: *mut s_Solver); +} +extern "C" { + pub fn solver_addblackrules(solv: *mut s_Solver); +} +extern "C" { + pub fn solver_addrecommendsrules(solv: *mut s_Solver); +} +extern "C" { + pub fn solver_addstrictrepopriorules(solv: *mut s_Solver, addedmap: *mut Map); +} +extern "C" { + pub fn solver_disablepolicyrules(solv: *mut s_Solver); +} +extern "C" { + pub fn solver_reenablepolicyrules(solv: *mut s_Solver, jobidx: libc::c_int); +} +extern "C" { + pub fn solver_reenablepolicyrules_cleandeps(solv: *mut s_Solver, pkg: Id); +} +extern "C" { + pub fn solver_allruleinfos(solv: *mut s_Solver, rid: Id, rq: *mut Queue) -> libc::c_int; +} +extern "C" { + pub fn solver_ruleinfo( + solv: *mut s_Solver, + rid: Id, + fromp: *mut Id, + top: *mut Id, + depp: *mut Id, + ) -> SolverRuleinfo; +} +extern "C" { + pub fn solver_ruleclass(solv: *mut s_Solver, rid: Id) -> SolverRuleinfo; +} +extern "C" { + pub fn solver_ruleliterals(solv: *mut s_Solver, rid: Id, q: *mut Queue); +} +extern "C" { + pub fn solver_rule2jobidx(solv: *mut s_Solver, rid: Id) -> libc::c_int; +} +extern "C" { + pub fn solver_rule2job(solv: *mut s_Solver, rid: Id, whatp: *mut Id) -> Id; +} +extern "C" { + pub fn solver_rule2solvable(solv: *mut s_Solver, rid: Id) -> Id; +} +extern "C" { + pub fn solver_rule2rules(solv: *mut s_Solver, rid: Id, q: *mut Queue, recursive: libc::c_int); +} +extern "C" { + pub fn solver_rule2pkgrule(solv: *mut s_Solver, rid: Id) -> Id; +} +extern "C" { + pub fn solver_breakorphans(solv: *mut s_Solver); +} +extern "C" { + pub fn solver_check_brokenorphanrules(solv: *mut s_Solver, dq: *mut Queue); +} +extern "C" { + pub fn solver_recordproblem(solv: *mut s_Solver, rid: Id); +} +extern "C" { + pub fn solver_fixproblem(solv: *mut s_Solver, rid: Id); +} +extern "C" { + pub fn solver_autouninstall(solv: *mut s_Solver, start: libc::c_int) -> Id; +} +extern "C" { + pub fn solver_disableproblemset(solv: *mut s_Solver, start: libc::c_int); +} +extern "C" { + pub fn solver_prepare_solutions(solv: *mut s_Solver) -> libc::c_int; +} +extern "C" { + pub fn solver_problem_count(solv: *mut s_Solver) -> libc::c_uint; +} +extern "C" { + pub fn solver_next_problem(solv: *mut s_Solver, problem: Id) -> Id; +} +extern "C" { + pub fn solver_solution_count(solv: *mut s_Solver, problem: Id) -> libc::c_uint; +} +extern "C" { + pub fn solver_next_solution(solv: *mut s_Solver, problem: Id, solution: Id) -> Id; +} +extern "C" { + pub fn solver_solutionelement_count( + solv: *mut s_Solver, + problem: Id, + solution: Id, + ) -> libc::c_uint; +} +extern "C" { + pub fn solver_solutionelement_internalid(solv: *mut s_Solver, problem: Id, solution: Id) -> Id; +} +extern "C" { + pub fn solver_solutionelement_extrajobflags( + solv: *mut s_Solver, + problem: Id, + solution: Id, + ) -> Id; +} +extern "C" { + pub fn solver_next_solutionelement( + solv: *mut s_Solver, + problem: Id, + solution: Id, + element: Id, + p: *mut Id, + rp: *mut Id, + ) -> Id; +} +extern "C" { + pub fn solver_take_solutionelement( + solv: *mut s_Solver, + p: Id, + rp: Id, + extrajobflags: Id, + job: *mut Queue, + ); +} +extern "C" { + pub fn solver_take_solution(solv: *mut s_Solver, problem: Id, solution: Id, job: *mut Queue); +} +extern "C" { + pub fn solver_findproblemrule(solv: *mut s_Solver, problem: Id) -> Id; +} +extern "C" { + pub fn solver_findallproblemrules(solv: *mut s_Solver, problem: Id, rules: *mut Queue); +} +extern "C" { + pub fn solver_problemruleinfo2str( + solv: *mut s_Solver, + type_: SolverRuleinfo, + source: Id, + target: Id, + dep: Id, + ) -> *const libc::c_char; +} +extern "C" { + pub fn solver_problem2str(solv: *mut s_Solver, problem: Id) -> *const libc::c_char; +} +extern "C" { + pub fn solver_solutionelement2str(solv: *mut s_Solver, p: Id, rp: Id) -> *const libc::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct s_Solver { + pub pool: *mut Pool, + pub job: Queue, + pub solution_callback: ::std::option::Option< + unsafe extern "C" fn(solv: *mut s_Solver, data: *mut libc::c_void) -> libc::c_int, + >, + pub solution_callback_data: *mut libc::c_void, + pub pooljobcnt: libc::c_int, +} +pub type Solver = s_Solver; +extern "C" { + pub fn solver_create(pool: *mut Pool) -> *mut Solver; +} +extern "C" { + pub fn solver_free(solv: *mut Solver); +} +extern "C" { + pub fn solver_solve(solv: *mut Solver, job: *mut Queue) -> libc::c_int; +} +extern "C" { + pub fn solver_create_transaction(solv: *mut Solver) -> *mut Transaction; +} +extern "C" { + pub fn solver_set_flag(solv: *mut Solver, flag: libc::c_int, value: libc::c_int) + -> libc::c_int; +} +extern "C" { + pub fn solver_get_flag(solv: *mut Solver, flag: libc::c_int) -> libc::c_int; +} +extern "C" { + pub fn solver_get_decisionlevel(solv: *mut Solver, p: Id) -> libc::c_int; +} +extern "C" { + pub fn solver_get_decisionqueue(solv: *mut Solver, decisionq: *mut Queue); +} +extern "C" { + pub fn solver_get_lastdecisionblocklevel(solv: *mut Solver) -> libc::c_int; +} +extern "C" { + pub fn solver_get_decisionblock(solv: *mut Solver, level: libc::c_int, decisionq: *mut Queue); +} +extern "C" { + pub fn solver_get_orphaned(solv: *mut Solver, orphanedq: *mut Queue); +} +extern "C" { + pub fn solver_get_recommendations( + solv: *mut Solver, + recommendationsq: *mut Queue, + suggestionsq: *mut Queue, + noselected: libc::c_int, + ); +} +extern "C" { + pub fn solver_get_unneeded(solv: *mut Solver, unneededq: *mut Queue, filtered: libc::c_int); +} +extern "C" { + pub fn solver_get_userinstalled(solv: *mut Solver, q: *mut Queue, flags: libc::c_int); +} +extern "C" { + pub fn pool_add_userinstalled_jobs( + pool: *mut Pool, + q: *mut Queue, + job: *mut Queue, + flags: libc::c_int, + ); +} +extern "C" { + pub fn solver_get_cleandeps(solv: *mut Solver, cleandepsq: *mut Queue); +} +extern "C" { + pub fn solver_describe_decision(solv: *mut Solver, p: Id, infop: *mut Id) -> libc::c_int; +} +extern "C" { + pub fn solver_describe_weakdep_decision(solv: *mut Solver, p: Id, whyq: *mut Queue); +} +extern "C" { + pub fn solver_alternatives_count(solv: *mut Solver) -> libc::c_int; +} +extern "C" { + pub fn solver_get_alternative( + solv: *mut Solver, + alternative: Id, + idp: *mut Id, + fromp: *mut Id, + chosenp: *mut Id, + choices: *mut Queue, + levelp: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn solver_calculate_multiversionmap( + pool: *mut Pool, + job: *mut Queue, + multiversionmap: *mut Map, + ); +} +extern "C" { + pub fn solver_calculate_noobsmap(pool: *mut Pool, job: *mut Queue, multiversionmap: *mut Map); +} +extern "C" { + pub fn solver_create_state_maps( + solv: *mut Solver, + installedmap: *mut Map, + conflictsmap: *mut Map, + ); +} +extern "C" { + pub fn solver_calc_duchanges(solv: *mut Solver, mps: *mut DUChanges, nmps: libc::c_int); +} +extern "C" { + pub fn solver_calc_installsizechange(solv: *mut Solver) -> libc::c_int; +} +extern "C" { + pub fn pool_job2solvables(pool: *mut Pool, pkgs: *mut Queue, how: Id, what: Id); +} +extern "C" { + pub fn pool_isemptyupdatejob(pool: *mut Pool, how: Id, what: Id) -> libc::c_int; +} +extern "C" { + pub fn solver_select2str(pool: *mut Pool, select: Id, what: Id) -> *const libc::c_char; +} +extern "C" { + pub fn pool_job2str(pool: *mut Pool, how: Id, what: Id, flagmask: Id) -> *const libc::c_char; +} +extern "C" { + pub fn solver_alternative2str( + solv: *mut Solver, + type_: libc::c_int, + id: Id, + from: Id, + ) -> *const libc::c_char; +} +extern "C" { + pub fn solver_trivial_installable(solv: *mut Solver, pkgs: *mut Queue, res: *mut Queue); +} +extern "C" { + pub fn solver_printruleelement(solv: *mut Solver, type_: libc::c_int, r: *mut Rule, v: Id); +} +extern "C" { + pub fn solver_printrule(solv: *mut Solver, type_: libc::c_int, r: *mut Rule); +} +extern "C" { + pub fn solver_printruleclass(solv: *mut Solver, type_: libc::c_int, r: *mut Rule); +} +extern "C" { + pub fn solver_printproblem(solv: *mut Solver, v: Id); +} +extern "C" { + pub fn solver_printwatches(solv: *mut Solver, type_: libc::c_int); +} +extern "C" { + pub fn solver_printdecisionq(solv: *mut Solver, type_: libc::c_int); +} +extern "C" { + pub fn solver_printdecisions(solv: *mut Solver); +} +extern "C" { + pub fn solver_printproblemruleinfo(solv: *mut Solver, rule: Id); +} +extern "C" { + pub fn solver_printprobleminfo(solv: *mut Solver, problem: Id); +} +extern "C" { + pub fn solver_printcompleteprobleminfo(solv: *mut Solver, problem: Id); +} +extern "C" { + pub fn solver_printsolution(solv: *mut Solver, problem: Id, solution: Id); +} +extern "C" { + pub fn solver_printallsolutions(solv: *mut Solver); +} +extern "C" { + pub fn transaction_print(trans: *mut Transaction); +} +extern "C" { + pub fn solver_printtrivial(solv: *mut Solver); +} +extern "C" { + pub fn selection_make( + pool: *mut Pool, + selection: *mut Queue, + name: *const libc::c_char, + flags: libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn selection_make_matchdeps( + pool: *mut Pool, + selection: *mut Queue, + name: *const libc::c_char, + flags: libc::c_int, + keyname: libc::c_int, + marker: libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn selection_make_matchdepid( + pool: *mut Pool, + selection: *mut Queue, + dep: Id, + flags: libc::c_int, + keyname: libc::c_int, + marker: libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn selection_make_matchsolvable( + pool: *mut Pool, + selection: *mut Queue, + solvid: Id, + flags: libc::c_int, + keyname: libc::c_int, + marker: libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn selection_make_matchsolvablelist( + pool: *mut Pool, + selection: *mut Queue, + solvidq: *mut Queue, + flags: libc::c_int, + keyname: libc::c_int, + marker: libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn selection_filter(pool: *mut Pool, sel1: *mut Queue, sel2: *mut Queue); +} +extern "C" { + pub fn selection_add(pool: *mut Pool, sel1: *mut Queue, sel2: *mut Queue); +} +extern "C" { + pub fn selection_subtract(pool: *mut Pool, sel1: *mut Queue, sel2: *mut Queue); +} +extern "C" { + pub fn selection_solvables(pool: *mut Pool, selection: *mut Queue, pkgs: *mut Queue); +} +extern "C" { + pub fn pool_selection2str( + pool: *mut Pool, + selection: *mut Queue, + flagmask: Id, + ) -> *const libc::c_char; +} +extern "C" { + pub fn pool_evrcmp_conda( + pool: *const Pool, + evr1: *const libc::c_char, + evr2: *const libc::c_char, + mode: libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn solvable_conda_matchversion( + s: *mut Solvable, + version: *const libc::c_char, + ) -> libc::c_int; +} +extern "C" { + pub fn pool_addrelproviders_conda(pool: *mut Pool, name: Id, evr: Id, plist: *mut Queue) -> Id; +} +extern "C" { + pub fn pool_conda_matchspec(pool: *mut Pool, name: *const libc::c_char) -> Id; +} +extern "C" { + pub fn repo_add_solv(repo: *mut Repo, fp: *mut FILE, flags: libc::c_int) -> libc::c_int; +} +extern "C" { + pub fn solv_read_userdata( + fp: *mut FILE, + datap: *mut *mut libc::c_uchar, + lenp: *mut libc::c_int, + ) -> libc::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct s_Repowriter { + pub repo: *mut Repo, + pub flags: libc::c_int, + pub repodatastart: libc::c_int, + pub repodataend: libc::c_int, + pub solvablestart: libc::c_int, + pub solvableend: libc::c_int, + pub keyfilter: ::std::option::Option< + unsafe extern "C" fn( + repo: *mut Repo, + key: *mut Repokey, + kfdata: *mut libc::c_void, + ) -> libc::c_int, + >, + pub kfdata: *mut libc::c_void, + pub keyq: *mut Queue, + pub userdata: *mut libc::c_void, + pub userdatalen: libc::c_int, +} +pub type Repowriter = s_Repowriter; +extern "C" { + pub fn repowriter_create(repo: *mut Repo) -> *mut Repowriter; +} +extern "C" { + pub fn repowriter_free(writer: *mut Repowriter) -> *mut Repowriter; +} +extern "C" { + pub fn repowriter_set_flags(writer: *mut Repowriter, flags: libc::c_int); +} +extern "C" { + pub fn repowriter_set_keyfilter( + writer: *mut Repowriter, + keyfilter: ::std::option::Option< + unsafe extern "C" fn( + repo: *mut Repo, + key: *mut Repokey, + kfdata: *mut libc::c_void, + ) -> libc::c_int, + >, + kfdata: *mut libc::c_void, + ); +} +extern "C" { + pub fn repowriter_set_keyqueue(writer: *mut Repowriter, keyq: *mut Queue); +} +extern "C" { + pub fn repowriter_set_repodatarange( + writer: *mut Repowriter, + repodatastart: libc::c_int, + repodataend: libc::c_int, + ); +} +extern "C" { + pub fn repowriter_set_solvablerange( + writer: *mut Repowriter, + solvablestart: libc::c_int, + solvableend: libc::c_int, + ); +} +extern "C" { + pub fn repowriter_set_userdata( + writer: *mut Repowriter, + data: *const libc::c_void, + len: libc::c_int, + ); +} +extern "C" { + pub fn repowriter_write(writer: *mut Repowriter, fp: *mut FILE) -> libc::c_int; +} +extern "C" { + pub fn repo_write(repo: *mut Repo, fp: *mut FILE) -> libc::c_int; +} +extern "C" { + pub fn repodata_write(data: *mut Repodata, fp: *mut FILE) -> libc::c_int; +} +extern "C" { + pub fn repo_write_stdkeyfilter( + repo: *mut Repo, + key: *mut Repokey, + kfdata: *mut libc::c_void, + ) -> libc::c_int; +} +extern "C" { + pub fn repo_write_filtered( + repo: *mut Repo, + fp: *mut FILE, + keyfilter: ::std::option::Option< + unsafe extern "C" fn( + repo: *mut Repo, + key: *mut Repokey, + kfdata: *mut libc::c_void, + ) -> libc::c_int, + >, + kfdata: *mut libc::c_void, + keyq: *mut Queue, + ) -> libc::c_int; +} +extern "C" { + pub fn repodata_write_filtered( + data: *mut Repodata, + fp: *mut FILE, + keyfilter: ::std::option::Option< + unsafe extern "C" fn( + repo: *mut Repo, + key: *mut Repokey, + kfdata: *mut libc::c_void, + ) -> libc::c_int, + >, + kfdata: *mut libc::c_void, + keyq: *mut Queue, + ) -> libc::c_int; +} +extern "C" { + pub fn repo_add_conda(repo: *mut Repo, fp: *mut FILE, flags: libc::c_int) -> libc::c_int; +} diff --git a/crates/libsolv_rs/Cargo.toml b/crates/rattler_libsolv_rs/Cargo.toml similarity index 85% rename from crates/libsolv_rs/Cargo.toml rename to crates/rattler_libsolv_rs/Cargo.toml index ac644c1b9..3ad38de02 100644 --- a/crates/libsolv_rs/Cargo.toml +++ b/crates/rattler_libsolv_rs/Cargo.toml @@ -1,7 +1,7 @@ [package] -name = "libsolv_rs" -version = "0.1.0" -edition = "2021" +name = "rattler_libsolv_rs" +version.workspace = true +edition.workspace = true authors = ["Adolfo Ochagavía "] description = "SAT solving library for dependency resolution" categories.workspace = true diff --git a/crates/libsolv_rs/src/arena.rs b/crates/rattler_libsolv_rs/src/arena.rs similarity index 100% rename from crates/libsolv_rs/src/arena.rs rename to crates/rattler_libsolv_rs/src/arena.rs diff --git a/crates/libsolv_rs/src/conda_util.rs b/crates/rattler_libsolv_rs/src/conda_util.rs similarity index 100% rename from crates/libsolv_rs/src/conda_util.rs rename to crates/rattler_libsolv_rs/src/conda_util.rs diff --git a/crates/libsolv_rs/src/id.rs b/crates/rattler_libsolv_rs/src/id.rs similarity index 95% rename from crates/libsolv_rs/src/id.rs rename to crates/rattler_libsolv_rs/src/id.rs index 904808dda..a3f0894f1 100644 --- a/crates/libsolv_rs/src/id.rs +++ b/crates/rattler_libsolv_rs/src/id.rs @@ -1,117 +1,117 @@ -use crate::arena::ArenaId; - -/// The id associated to a libsolv repo -#[repr(transparent)] -#[derive(Clone, Copy, Eq, PartialEq, Hash)] -pub struct RepoId(u32); - -impl RepoId { - pub(crate) fn new(id: u32) -> Self { - Self(id) - } -} - -/// The id associated to a package name -#[repr(transparent)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub struct NameId(u32); - -impl ArenaId for NameId { - fn from_usize(x: usize) -> Self { - Self(x as u32) - } - - fn to_usize(self) -> usize { - self.0 as usize - } -} - -/// The id associated to a match spec -#[repr(transparent)] -#[derive(Clone, Copy, Debug, Hash, Eq, PartialEq, Ord, PartialOrd)] -pub struct MatchSpecId(u32); - -impl ArenaId for MatchSpecId { - fn from_usize(x: usize) -> Self { - Self(x as u32) - } - - fn to_usize(self) -> usize { - self.0 as usize - } -} - -/// The id associated to a solvable -#[repr(transparent)] -#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug, Ord, PartialOrd)] -pub struct SolvableId(u32); - -impl SolvableId { - pub(crate) fn root() -> Self { - Self(0) - } - - pub(crate) fn is_root(self) -> bool { - self.0 == 0 - } - - pub(crate) fn null() -> Self { - Self(u32::MAX) - } - - pub(crate) fn is_null(self) -> bool { - self.0 == u32::MAX - } -} - -impl ArenaId for SolvableId { - fn from_usize(x: usize) -> Self { - Self(x as u32) - } - - fn to_usize(self) -> usize { - self.0 as usize - } -} - -#[repr(transparent)] -#[derive(Copy, Clone, PartialOrd, Ord, Eq, PartialEq, Debug, Hash)] -pub(crate) struct ClauseId(u32); - -impl ClauseId { - pub(crate) fn new(index: usize) -> Self { - debug_assert_ne!(index, 0); - debug_assert_ne!(index, u32::MAX as usize); - - Self(index as u32) - } - - pub(crate) fn install_root() -> Self { - Self(0) - } - - pub(crate) fn index(self) -> usize { - self.0 as usize - } - - pub(crate) fn is_null(self) -> bool { - self.0 == u32::MAX - } - - pub(crate) fn null() -> ClauseId { - ClauseId(u32::MAX) - } -} - -#[derive(Copy, Clone, Debug)] -pub(crate) struct LearntClauseId(u32); - -impl ArenaId for LearntClauseId { - fn from_usize(x: usize) -> Self { - Self(x as u32) - } - - fn to_usize(self) -> usize { - self.0 as usize - } -} +use crate::arena::ArenaId; + +/// The id associated to a libsolv repo +#[repr(transparent)] +#[derive(Clone, Copy, Eq, PartialEq, Hash)] +pub struct RepoId(u32); + +impl RepoId { + pub(crate) fn new(id: u32) -> Self { + Self(id) + } +} + +/// The id associated to a package name +#[repr(transparent)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub struct NameId(u32); + +impl ArenaId for NameId { + fn from_usize(x: usize) -> Self { + Self(x as u32) + } + + fn to_usize(self) -> usize { + self.0 as usize + } +} + +/// The id associated to a match spec +#[repr(transparent)] +#[derive(Clone, Copy, Debug, Hash, Eq, PartialEq, Ord, PartialOrd)] +pub struct MatchSpecId(u32); + +impl ArenaId for MatchSpecId { + fn from_usize(x: usize) -> Self { + Self(x as u32) + } + + fn to_usize(self) -> usize { + self.0 as usize + } +} + +/// The id associated to a solvable +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug, Ord, PartialOrd)] +pub struct SolvableId(u32); + +impl SolvableId { + pub(crate) fn root() -> Self { + Self(0) + } + + pub(crate) fn is_root(self) -> bool { + self.0 == 0 + } + + pub(crate) fn null() -> Self { + Self(u32::MAX) + } + + pub(crate) fn is_null(self) -> bool { + self.0 == u32::MAX + } +} + +impl ArenaId for SolvableId { + fn from_usize(x: usize) -> Self { + Self(x as u32) + } + + fn to_usize(self) -> usize { + self.0 as usize + } +} + +#[repr(transparent)] +#[derive(Copy, Clone, PartialOrd, Ord, Eq, PartialEq, Debug, Hash)] +pub(crate) struct ClauseId(u32); + +impl ClauseId { + pub(crate) fn new(index: usize) -> Self { + debug_assert_ne!(index, 0); + debug_assert_ne!(index, u32::MAX as usize); + + Self(index as u32) + } + + pub(crate) fn install_root() -> Self { + Self(0) + } + + pub(crate) fn index(self) -> usize { + self.0 as usize + } + + pub(crate) fn is_null(self) -> bool { + self.0 == u32::MAX + } + + pub(crate) fn null() -> ClauseId { + ClauseId(u32::MAX) + } +} + +#[derive(Copy, Clone, Debug)] +pub(crate) struct LearntClauseId(u32); + +impl ArenaId for LearntClauseId { + fn from_usize(x: usize) -> Self { + Self(x as u32) + } + + fn to_usize(self) -> usize { + self.0 as usize + } +} diff --git a/crates/libsolv_rs/src/lib.rs b/crates/rattler_libsolv_rs/src/lib.rs similarity index 100% rename from crates/libsolv_rs/src/lib.rs rename to crates/rattler_libsolv_rs/src/lib.rs diff --git a/crates/libsolv_rs/src/mapping.rs b/crates/rattler_libsolv_rs/src/mapping.rs similarity index 100% rename from crates/libsolv_rs/src/mapping.rs rename to crates/rattler_libsolv_rs/src/mapping.rs diff --git a/crates/libsolv_rs/src/pool.rs b/crates/rattler_libsolv_rs/src/pool.rs similarity index 100% rename from crates/libsolv_rs/src/pool.rs rename to crates/rattler_libsolv_rs/src/pool.rs diff --git a/crates/libsolv_rs/src/problem.rs b/crates/rattler_libsolv_rs/src/problem.rs similarity index 100% rename from crates/libsolv_rs/src/problem.rs rename to crates/rattler_libsolv_rs/src/problem.rs diff --git a/crates/libsolv_rs/src/solvable.rs b/crates/rattler_libsolv_rs/src/solvable.rs similarity index 100% rename from crates/libsolv_rs/src/solvable.rs rename to crates/rattler_libsolv_rs/src/solvable.rs diff --git a/crates/libsolv_rs/src/solve_jobs.rs b/crates/rattler_libsolv_rs/src/solve_jobs.rs similarity index 100% rename from crates/libsolv_rs/src/solve_jobs.rs rename to crates/rattler_libsolv_rs/src/solve_jobs.rs diff --git a/crates/libsolv_rs/src/solver/clause.rs b/crates/rattler_libsolv_rs/src/solver/clause.rs similarity index 100% rename from crates/libsolv_rs/src/solver/clause.rs rename to crates/rattler_libsolv_rs/src/solver/clause.rs diff --git a/crates/libsolv_rs/src/solver/decision.rs b/crates/rattler_libsolv_rs/src/solver/decision.rs similarity index 96% rename from crates/libsolv_rs/src/solver/decision.rs rename to crates/rattler_libsolv_rs/src/solver/decision.rs index 7f92ec8bc..57fd0f244 100644 --- a/crates/libsolv_rs/src/solver/decision.rs +++ b/crates/rattler_libsolv_rs/src/solver/decision.rs @@ -1,19 +1,19 @@ -use crate::id::{ClauseId, SolvableId}; - -/// Represents an assignment to a variable -#[derive(Copy, Clone, Eq, PartialEq)] -pub(crate) struct Decision { - pub(crate) solvable_id: SolvableId, - pub(crate) value: bool, - pub(crate) derived_from: ClauseId, -} - -impl Decision { - pub(crate) fn new(solvable: SolvableId, value: bool, derived_from: ClauseId) -> Self { - Self { - solvable_id: solvable, - value, - derived_from, - } - } -} +use crate::id::{ClauseId, SolvableId}; + +/// Represents an assignment to a variable +#[derive(Copy, Clone, Eq, PartialEq)] +pub(crate) struct Decision { + pub(crate) solvable_id: SolvableId, + pub(crate) value: bool, + pub(crate) derived_from: ClauseId, +} + +impl Decision { + pub(crate) fn new(solvable: SolvableId, value: bool, derived_from: ClauseId) -> Self { + Self { + solvable_id: solvable, + value, + derived_from, + } + } +} diff --git a/crates/libsolv_rs/src/solver/decision_map.rs b/crates/rattler_libsolv_rs/src/solver/decision_map.rs similarity index 100% rename from crates/libsolv_rs/src/solver/decision_map.rs rename to crates/rattler_libsolv_rs/src/solver/decision_map.rs diff --git a/crates/libsolv_rs/src/solver/decision_tracker.rs b/crates/rattler_libsolv_rs/src/solver/decision_tracker.rs similarity index 100% rename from crates/libsolv_rs/src/solver/decision_tracker.rs rename to crates/rattler_libsolv_rs/src/solver/decision_tracker.rs diff --git a/crates/libsolv_rs/src/solver/mod.rs b/crates/rattler_libsolv_rs/src/solver/mod.rs similarity index 100% rename from crates/libsolv_rs/src/solver/mod.rs rename to crates/rattler_libsolv_rs/src/solver/mod.rs diff --git a/crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__resolve_with_conflict.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__resolve_with_conflict.snap similarity index 100% rename from crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__resolve_with_conflict.snap rename to crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__resolve_with_conflict.snap diff --git a/crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_after_backtracking.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_after_backtracking.snap similarity index 100% rename from crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_after_backtracking.snap rename to crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_after_backtracking.snap diff --git a/crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_applies_graph_compression.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_applies_graph_compression.snap similarity index 100% rename from crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_applies_graph_compression.snap rename to crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_applies_graph_compression.snap diff --git a/crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_bluesky_conflict.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_bluesky_conflict.snap similarity index 100% rename from crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_bluesky_conflict.snap rename to crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_bluesky_conflict.snap diff --git a/crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_constrains.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_constrains.snap similarity index 100% rename from crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_constrains.snap rename to crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_constrains.snap diff --git a/crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_incompatible_root_requirements.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_incompatible_root_requirements.snap similarity index 100% rename from crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_incompatible_root_requirements.snap rename to crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_incompatible_root_requirements.snap diff --git a/crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_locked_and_excluded.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_locked_and_excluded.snap similarity index 100% rename from crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_locked_and_excluded.snap rename to crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_locked_and_excluded.snap diff --git a/crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_missing_top_level_dep_1.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_missing_top_level_dep_1.snap similarity index 100% rename from crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_missing_top_level_dep_1.snap rename to crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_missing_top_level_dep_1.snap diff --git a/crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_missing_top_level_dep_2.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_missing_top_level_dep_2.snap similarity index 100% rename from crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_missing_top_level_dep_2.snap rename to crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_missing_top_level_dep_2.snap diff --git a/crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_no_candidates_for_child_1.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_no_candidates_for_child_1.snap similarity index 100% rename from crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_no_candidates_for_child_1.snap rename to crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_no_candidates_for_child_1.snap diff --git a/crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_no_candidates_for_child_2.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_no_candidates_for_child_2.snap similarity index 100% rename from crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_no_candidates_for_child_2.snap rename to crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_no_candidates_for_child_2.snap diff --git a/crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_pubgrub_article.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_pubgrub_article.snap similarity index 100% rename from crates/libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_pubgrub_article.snap rename to crates/rattler_libsolv_rs/src/solver/snapshots/libsolv_rs__solver__test__unsat_pubgrub_article.snap diff --git a/crates/libsolv_rs/src/solver/watch_map.rs b/crates/rattler_libsolv_rs/src/solver/watch_map.rs similarity index 100% rename from crates/libsolv_rs/src/solver/watch_map.rs rename to crates/rattler_libsolv_rs/src/solver/watch_map.rs diff --git a/crates/libsolv_rs/src/transaction.rs b/crates/rattler_libsolv_rs/src/transaction.rs similarity index 100% rename from crates/libsolv_rs/src/transaction.rs rename to crates/rattler_libsolv_rs/src/transaction.rs diff --git a/crates/rattler_solve/Cargo.toml b/crates/rattler_solve/Cargo.toml index a071fef71..69ae44f2c 100644 --- a/crates/rattler_solve/Cargo.toml +++ b/crates/rattler_solve/Cargo.toml @@ -21,8 +21,8 @@ serde = { version = "1.0.163", features = ["derive"] } url = "2.4.0" hex = "0.4.3" tempfile = "3.6.0" -libsolv-sys = { version = "0.1.0", path = "../libsolv-sys", optional = true } -libsolv_rs = { version = "0.1.0", path = "../libsolv_rs", optional = true } +rattler_libsolv_c = { version = "0.5.0", path = "../rattler_libsolv_c", optional = true } +rattler_libsolv_rs = { version = "0.5.0", path = "../rattler_libsolv_rs", optional = true } [dev-dependencies] rattler_repodata_gateway = { version = "0.5.0", path = "../rattler_repodata_gateway", default-features = false, features = ["sparse"] } @@ -35,8 +35,9 @@ once_cell = "1.18.0" criterion = "0.5.1" [features] -default = ["libsolv-sys"] -libsolv-sys = ["dep:libsolv-sys", "libc"] +default = ["libsolv_c"] +libsolv_c = ["rattler_libsolv_c", "libc"] +libsolv_rs = ["rattler_libsolv_rs"] [[bench]] name = "bench" diff --git a/crates/rattler_solve/benches/bench.rs b/crates/rattler_solve/benches/bench.rs index 2f48f36ac..c1c5358aa 100644 --- a/crates/rattler_solve/benches/bench.rs +++ b/crates/rattler_solve/benches/bench.rs @@ -53,10 +53,10 @@ fn bench_solve_environment(c: &mut Criterion, specs: Vec<&str>) { let available_packages = SparseRepoData::load_records_recursive(&sparse_repo_datas, names).unwrap(); - #[cfg(feature = "libsolv-sys")] - group.bench_function("libsolv-sys", |b| { + #[cfg(feature = "libsolv_c")] + group.bench_function("libsolv_c", |b| { b.iter(|| { - rattler_solve::libsolv_sys::Solver + rattler_solve::libsolv_c::Solver .solve(black_box(SolverTask { available_packages: &available_packages, locked_packages: vec![], diff --git a/crates/rattler_solve/src/lib.rs b/crates/rattler_solve/src/lib.rs index fcb784644..b3cfbb1db 100644 --- a/crates/rattler_solve/src/lib.rs +++ b/crates/rattler_solve/src/lib.rs @@ -5,8 +5,8 @@ #[cfg(feature = "libsolv_rs")] pub mod libsolv_rs; -#[cfg(feature = "libsolv-sys")] -pub mod libsolv_sys; +#[cfg(feature = "libsolv_c")] +pub mod libsolv_c; use rattler_conda_types::{GenericVirtualPackage, MatchSpec, RepoDataRecord}; use std::fmt; @@ -96,7 +96,7 @@ pub struct SolverTask { /// repodata that is most suitable for a specific backend. /// /// Some solvers may add additional functionality to their specific implementation that enables -/// caching the repodata to disk in an efficient way (see [`crate::libsolv_sys::RepoData`] for +/// caching the repodata to disk in an efficient way (see [`crate::libsolv_c::RepoData`] for /// an example). pub trait SolverRepoData<'a>: FromIterator<&'a RepoDataRecord> {} diff --git a/crates/rattler_solve/src/libsolv_sys/input.rs b/crates/rattler_solve/src/libsolv_c/input.rs similarity index 100% rename from crates/rattler_solve/src/libsolv_sys/input.rs rename to crates/rattler_solve/src/libsolv_c/input.rs diff --git a/crates/rattler_solve/src/libsolv_sys/libc_byte_slice.rs b/crates/rattler_solve/src/libsolv_c/libc_byte_slice.rs similarity index 100% rename from crates/rattler_solve/src/libsolv_sys/libc_byte_slice.rs rename to crates/rattler_solve/src/libsolv_c/libc_byte_slice.rs diff --git a/crates/rattler_solve/src/libsolv_sys/mod.rs b/crates/rattler_solve/src/libsolv_c/mod.rs similarity index 100% rename from crates/rattler_solve/src/libsolv_sys/mod.rs rename to crates/rattler_solve/src/libsolv_c/mod.rs diff --git a/crates/rattler_solve/src/libsolv_sys/output.rs b/crates/rattler_solve/src/libsolv_c/output.rs similarity index 100% rename from crates/rattler_solve/src/libsolv_sys/output.rs rename to crates/rattler_solve/src/libsolv_c/output.rs diff --git a/crates/rattler_solve/src/libsolv_sys/wrapper/flags.rs b/crates/rattler_solve/src/libsolv_c/wrapper/flags.rs similarity index 100% rename from crates/rattler_solve/src/libsolv_sys/wrapper/flags.rs rename to crates/rattler_solve/src/libsolv_c/wrapper/flags.rs diff --git a/crates/rattler_solve/src/libsolv_sys/wrapper/keys.rs b/crates/rattler_solve/src/libsolv_c/wrapper/keys.rs similarity index 100% rename from crates/rattler_solve/src/libsolv_sys/wrapper/keys.rs rename to crates/rattler_solve/src/libsolv_c/wrapper/keys.rs diff --git a/crates/rattler_solve/src/libsolv_sys/wrapper/mod.rs b/crates/rattler_solve/src/libsolv_c/wrapper/mod.rs similarity index 96% rename from crates/rattler_solve/src/libsolv_sys/wrapper/mod.rs rename to crates/rattler_solve/src/libsolv_c/wrapper/mod.rs index f02454779..9e01685fc 100644 --- a/crates/rattler_solve/src/libsolv_sys/wrapper/mod.rs +++ b/crates/rattler_solve/src/libsolv_c/wrapper/mod.rs @@ -23,4 +23,4 @@ pub mod solve_problem; pub mod solver; pub mod transaction; -pub use libsolv_sys as ffi; +pub use rattler_libsolv_c as ffi; diff --git a/crates/rattler_solve/src/libsolv_sys/wrapper/pool.rs b/crates/rattler_solve/src/libsolv_c/wrapper/pool.rs similarity index 100% rename from crates/rattler_solve/src/libsolv_sys/wrapper/pool.rs rename to crates/rattler_solve/src/libsolv_c/wrapper/pool.rs diff --git a/crates/rattler_solve/src/libsolv_sys/wrapper/queue.rs b/crates/rattler_solve/src/libsolv_c/wrapper/queue.rs similarity index 100% rename from crates/rattler_solve/src/libsolv_sys/wrapper/queue.rs rename to crates/rattler_solve/src/libsolv_c/wrapper/queue.rs diff --git a/crates/rattler_solve/src/libsolv_sys/wrapper/repo.rs b/crates/rattler_solve/src/libsolv_c/wrapper/repo.rs similarity index 100% rename from crates/rattler_solve/src/libsolv_sys/wrapper/repo.rs rename to crates/rattler_solve/src/libsolv_c/wrapper/repo.rs diff --git a/crates/rattler_solve/src/libsolv_sys/wrapper/repodata.rs b/crates/rattler_solve/src/libsolv_c/wrapper/repodata.rs similarity index 100% rename from crates/rattler_solve/src/libsolv_sys/wrapper/repodata.rs rename to crates/rattler_solve/src/libsolv_c/wrapper/repodata.rs diff --git a/crates/rattler_solve/src/libsolv_sys/wrapper/solvable.rs b/crates/rattler_solve/src/libsolv_c/wrapper/solvable.rs similarity index 100% rename from crates/rattler_solve/src/libsolv_sys/wrapper/solvable.rs rename to crates/rattler_solve/src/libsolv_c/wrapper/solvable.rs diff --git a/crates/rattler_solve/src/libsolv_sys/wrapper/solve_goal.rs b/crates/rattler_solve/src/libsolv_c/wrapper/solve_goal.rs similarity index 100% rename from crates/rattler_solve/src/libsolv_sys/wrapper/solve_goal.rs rename to crates/rattler_solve/src/libsolv_c/wrapper/solve_goal.rs diff --git a/crates/rattler_solve/src/libsolv_sys/wrapper/solve_problem.rs b/crates/rattler_solve/src/libsolv_c/wrapper/solve_problem.rs similarity index 100% rename from crates/rattler_solve/src/libsolv_sys/wrapper/solve_problem.rs rename to crates/rattler_solve/src/libsolv_c/wrapper/solve_problem.rs diff --git a/crates/rattler_solve/src/libsolv_sys/wrapper/solver.rs b/crates/rattler_solve/src/libsolv_c/wrapper/solver.rs similarity index 100% rename from crates/rattler_solve/src/libsolv_sys/wrapper/solver.rs rename to crates/rattler_solve/src/libsolv_c/wrapper/solver.rs diff --git a/crates/rattler_solve/src/libsolv_sys/wrapper/transaction.rs b/crates/rattler_solve/src/libsolv_c/wrapper/transaction.rs similarity index 100% rename from crates/rattler_solve/src/libsolv_sys/wrapper/transaction.rs rename to crates/rattler_solve/src/libsolv_c/wrapper/transaction.rs diff --git a/crates/rattler_solve/src/libsolv_rs/input.rs b/crates/rattler_solve/src/libsolv_rs/input.rs index 96e095e0c..c33a168e8 100644 --- a/crates/rattler_solve/src/libsolv_rs/input.rs +++ b/crates/rattler_solve/src/libsolv_rs/input.rs @@ -1,7 +1,7 @@ //! Contains business logic that loads information into libsolv in order to solve a conda //! environment -use libsolv_rs::{Pool, RepoId, SolvableId}; +use rattler_libsolv_rs::{Pool, RepoId, SolvableId}; use rattler_conda_types::package::ArchiveType; use rattler_conda_types::{GenericVirtualPackage, PackageRecord, RepoDataRecord}; use std::cmp::Ordering; diff --git a/crates/rattler_solve/src/libsolv_rs/mod.rs b/crates/rattler_solve/src/libsolv_rs/mod.rs index 935eae6c6..7b8d2f3a7 100644 --- a/crates/rattler_solve/src/libsolv_rs/mod.rs +++ b/crates/rattler_solve/src/libsolv_rs/mod.rs @@ -3,7 +3,7 @@ use crate::{IntoRepoData, SolverRepoData}; use crate::{SolveError, SolverTask}; use input::{add_repodata_records, add_virtual_packages}; -use libsolv_rs::{Pool, SolveJobs, Solver as LibSolvRsSolver}; +use rattler_libsolv_rs::{Pool, SolveJobs, Solver as LibSolvRsSolver}; use output::get_required_packages; use rattler_conda_types::RepoDataRecord; use std::collections::HashMap; diff --git a/crates/rattler_solve/src/libsolv_rs/output.rs b/crates/rattler_solve/src/libsolv_rs/output.rs index 2ff9091de..942f19858 100644 --- a/crates/rattler_solve/src/libsolv_rs/output.rs +++ b/crates/rattler_solve/src/libsolv_rs/output.rs @@ -1,7 +1,7 @@ //! Contains business logic to retrieve the results from libsolv after attempting to resolve a conda //! environment -use libsolv_rs::{Pool, RepoId, SolvableId, Transaction}; +use rattler_libsolv_rs::{Pool, RepoId, SolvableId, Transaction}; use rattler_conda_types::RepoDataRecord; use std::collections::HashMap; diff --git a/crates/rattler_solve/tests/backends.rs b/crates/rattler_solve/tests/backends.rs index 312af901c..e53232481 100644 --- a/crates/rattler_solve/tests/backends.rs +++ b/crates/rattler_solve/tests/backends.rs @@ -391,18 +391,18 @@ macro_rules! solver_backend_tests { }; } -#[cfg(feature = "libsolv-sys")] -mod libsolv_sys { +#[cfg(feature = "libsolv_c")] +mod libsolv_c { use super::*; - solver_backend_tests!(rattler_solve::libsolv_sys::Solver); + solver_backend_tests!(rattler_solve::libsolv_c::Solver); #[test] #[cfg(target_family = "unix")] fn test_solve_with_cached_solv_file_install_new() { let repo_data = read_repodata(&dummy_channel_json_path()); - let cached_repo_data = rattler_solve::libsolv_sys::cache_repodata( + let cached_repo_data = rattler_solve::libsolv_c::cache_repodata( Channel::from_str("conda-forge", &ChannelConfig::default()) .unwrap() .platform_url(rattler_conda_types::Platform::Linux64) @@ -410,14 +410,14 @@ mod libsolv_sys { &repo_data, ); - let libsolv_repodata = rattler_solve::libsolv_sys::RepoData { + let libsolv_repodata = rattler_solve::libsolv_c::RepoData { records: repo_data.iter().collect(), solv_file: Some(&cached_repo_data), }; let specs: Vec = vec!["foo<4".parse().unwrap()]; - let pkgs = rattler_solve::libsolv_sys::Solver + let pkgs = rattler_solve::libsolv_c::Solver .solve(SolverTask { locked_packages: Vec::new(), virtual_packages: Vec::new(), @@ -532,11 +532,11 @@ fn compare_solve(specs: Vec<&str>) { let mut results = Vec::new(); - #[cfg(feature = "libsolv-sys")] + #[cfg(feature = "libsolv_c")] results.push(( - "libsolv-sys", + "libsolv_c", extract_pkgs( - rattler_solve::libsolv_sys::Solver + rattler_solve::libsolv_c::Solver .solve(SolverTask { available_packages: &available_packages, specs: specs.clone(), diff --git a/crates/tools/src/libsolv_bindings.rs b/crates/tools/src/libsolv_bindings.rs index fd6263fad..8528f2251 100644 --- a/crates/tools/src/libsolv_bindings.rs +++ b/crates/tools/src/libsolv_bindings.rs @@ -77,7 +77,7 @@ fn patch_enum_representation<'a>(input: &'a str, enum_name: &str) -> Cow<'a, str /// Generate or verify the libsolv bindings. pub fn generate(mode: Mode) -> anyhow::Result<()> { - let libsolv_path = project_root().join("crates/libsolv-sys/libsolv"); + let libsolv_path = project_root().join("crates/rattler_libsolv_c/libsolv"); // Normally the `solvversion.h` is generated from the `solverversion.h.in` by CMake when // building libsolv. However, for the bindings we don't need that much information from that @@ -137,7 +137,7 @@ pub fn generate(mode: Mode) -> anyhow::Result<()> { // Write (or check) the bindings update( - &project_root().join("crates/libsolv-sys/src/lib.rs"), + &project_root().join("crates/rattler_libsolv_c/src/lib.rs"), &libsolv_bindings, mode, ) From 2c25779cfb4518cc5f86b6152a4c908835135a83 Mon Sep 17 00:00:00 2001 From: Bas Zalmstra Date: Fri, 7 Jul 2023 14:56:54 +0200 Subject: [PATCH 2/7] fix: fmt --- crates/rattler-bin/src/commands/create.rs | 2 +- crates/rattler_solve/src/lib.rs | 4 ++-- crates/rattler_solve/src/libsolv_rs/input.rs | 2 +- crates/rattler_solve/src/libsolv_rs/mod.rs | 2 +- crates/rattler_solve/src/libsolv_rs/output.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/rattler-bin/src/commands/create.rs b/crates/rattler-bin/src/commands/create.rs index 17d3bff18..f34b325d6 100644 --- a/crates/rattler-bin/src/commands/create.rs +++ b/crates/rattler-bin/src/commands/create.rs @@ -15,7 +15,7 @@ use rattler_repodata_gateway::fetch::{ CacheResult, DownloadProgress, FetchRepoDataError, FetchRepoDataOptions, }; use rattler_repodata_gateway::sparse::SparseRepoData; -use rattler_solve::{libsolv_rs, libsolv_c, SolverImpl, SolverTask}; +use rattler_solve::{libsolv_c, libsolv_rs, SolverImpl, SolverTask}; use reqwest::{Client, StatusCode}; use std::{ borrow::Cow, diff --git a/crates/rattler_solve/src/lib.rs b/crates/rattler_solve/src/lib.rs index b3cfbb1db..154268992 100644 --- a/crates/rattler_solve/src/lib.rs +++ b/crates/rattler_solve/src/lib.rs @@ -3,10 +3,10 @@ #![deny(missing_docs)] -#[cfg(feature = "libsolv_rs")] -pub mod libsolv_rs; #[cfg(feature = "libsolv_c")] pub mod libsolv_c; +#[cfg(feature = "libsolv_rs")] +pub mod libsolv_rs; use rattler_conda_types::{GenericVirtualPackage, MatchSpec, RepoDataRecord}; use std::fmt; diff --git a/crates/rattler_solve/src/libsolv_rs/input.rs b/crates/rattler_solve/src/libsolv_rs/input.rs index c33a168e8..2309a91a4 100644 --- a/crates/rattler_solve/src/libsolv_rs/input.rs +++ b/crates/rattler_solve/src/libsolv_rs/input.rs @@ -1,9 +1,9 @@ //! Contains business logic that loads information into libsolv in order to solve a conda //! environment -use rattler_libsolv_rs::{Pool, RepoId, SolvableId}; use rattler_conda_types::package::ArchiveType; use rattler_conda_types::{GenericVirtualPackage, PackageRecord, RepoDataRecord}; +use rattler_libsolv_rs::{Pool, RepoId, SolvableId}; use std::cmp::Ordering; use std::collections::HashMap; diff --git a/crates/rattler_solve/src/libsolv_rs/mod.rs b/crates/rattler_solve/src/libsolv_rs/mod.rs index 7b8d2f3a7..1d51e8278 100644 --- a/crates/rattler_solve/src/libsolv_rs/mod.rs +++ b/crates/rattler_solve/src/libsolv_rs/mod.rs @@ -3,9 +3,9 @@ use crate::{IntoRepoData, SolverRepoData}; use crate::{SolveError, SolverTask}; use input::{add_repodata_records, add_virtual_packages}; -use rattler_libsolv_rs::{Pool, SolveJobs, Solver as LibSolvRsSolver}; use output::get_required_packages; use rattler_conda_types::RepoDataRecord; +use rattler_libsolv_rs::{Pool, SolveJobs, Solver as LibSolvRsSolver}; use std::collections::HashMap; mod input; diff --git a/crates/rattler_solve/src/libsolv_rs/output.rs b/crates/rattler_solve/src/libsolv_rs/output.rs index 942f19858..cca3ab405 100644 --- a/crates/rattler_solve/src/libsolv_rs/output.rs +++ b/crates/rattler_solve/src/libsolv_rs/output.rs @@ -1,8 +1,8 @@ //! Contains business logic to retrieve the results from libsolv after attempting to resolve a conda //! environment -use rattler_libsolv_rs::{Pool, RepoId, SolvableId, Transaction}; use rattler_conda_types::RepoDataRecord; +use rattler_libsolv_rs::{Pool, RepoId, SolvableId, Transaction}; use std::collections::HashMap; /// Returns which packages should be installed in the environment From af5bd1ebb71130a2f0acc35b6936a9a01af876cc Mon Sep 17 00:00:00 2001 From: Bas Zalmstra Date: Fri, 7 Jul 2023 15:05:26 +0200 Subject: [PATCH 3/7] fix: docs --- crates/rattler_solve/src/libsolv_rs/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/rattler_solve/src/libsolv_rs/mod.rs b/crates/rattler_solve/src/libsolv_rs/mod.rs index 1d51e8278..ce11d5250 100644 --- a/crates/rattler_solve/src/libsolv_rs/mod.rs +++ b/crates/rattler_solve/src/libsolv_rs/mod.rs @@ -1,4 +1,4 @@ -//! Provides an solver implementation based on the [`libsolv_rs`] crate. +//! Provides an solver implementation based on the [`rattler_libsolv_rs`] crate. use crate::{IntoRepoData, SolverRepoData}; use crate::{SolveError, SolverTask}; From 205e72f7998fe2621fa29f866be2eaa5ba5fbc71 Mon Sep 17 00:00:00 2001 From: Bas Zalmstra Date: Fri, 7 Jul 2023 15:37:40 +0200 Subject: [PATCH 4/7] fix: insta snapshots --- crates/rattler-bin/Cargo.toml | 1 + ..._rs__solver__test__resolve_with_conflict.snap | 8 ++++++++ ...__solver__test__unsat_after_backtracking.snap | 14 ++++++++++++++ ...r__test__unsat_applies_graph_compression.snap | 14 ++++++++++++++ ...rs__solver__test__unsat_bluesky_conflict.snap | 12 ++++++++++++ ...bsolv_rs__solver__test__unsat_constrains.snap | 13 +++++++++++++ ...st__unsat_incompatible_root_requirements.snap | 10 ++++++++++ ..._solver__test__unsat_locked_and_excluded.snap | 11 +++++++++++ ...ver__test__unsat_missing_top_level_dep_1.snap | 6 ++++++ ...ver__test__unsat_missing_top_level_dep_2.snap | 6 ++++++ ...r__test__unsat_no_candidates_for_child_1.snap | 8 ++++++++ ...r__test__unsat_no_candidates_for_child_2.snap | 8 ++++++++ ..._rs__solver__test__unsat_pubgrub_article.snap | 16 ++++++++++++++++ 13 files changed, 127 insertions(+) create mode 100644 crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__resolve_with_conflict.snap create mode 100644 crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_after_backtracking.snap create mode 100644 crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_applies_graph_compression.snap create mode 100644 crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_bluesky_conflict.snap create mode 100644 crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_constrains.snap create mode 100644 crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_incompatible_root_requirements.snap create mode 100644 crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_locked_and_excluded.snap create mode 100644 crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_missing_top_level_dep_1.snap create mode 100644 crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_missing_top_level_dep_2.snap create mode 100644 crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_no_candidates_for_child_1.snap create mode 100644 crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_no_candidates_for_child_2.snap create mode 100644 crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_pubgrub_article.snap diff --git a/crates/rattler-bin/Cargo.toml b/crates/rattler-bin/Cargo.toml index 92f54848b..279a852a2 100644 --- a/crates/rattler-bin/Cargo.toml +++ b/crates/rattler-bin/Cargo.toml @@ -9,6 +9,7 @@ homepage.workspace = true repository.workspace = true license.workspace = true readme.workspace = true +default-run = "rattler" [[bin]] name = "rattler" diff --git a/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__resolve_with_conflict.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__resolve_with_conflict.snap new file mode 100644 index 000000000..3dab550a5 --- /dev/null +++ b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__resolve_with_conflict.snap @@ -0,0 +1,8 @@ +--- +source: crates/rattler_libsolv_rs/src/solver/mod.rs +expression: display_result +--- +conflicting 1.0.0 +asdf 1.2.3 +efgh 4.5.7 + diff --git a/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_after_backtracking.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_after_backtracking.snap new file mode 100644 index 000000000..6b519931d --- /dev/null +++ b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_after_backtracking.snap @@ -0,0 +1,14 @@ +--- +source: crates/rattler_libsolv_rs/src/solver/mod.rs +expression: error +--- +The following packages are incompatible +|-- B can be installed with any of the following options: + |-- B 4.5.6 | 4.5.7 would require + |-- D 1.*, which can be installed with any of the following options: + |-- D 1.0.0 +|-- C cannot be installed because there are no viable options: + |-- C 1.0.0 | 1.0.1 would require + |-- D 2.*, which cannot be installed because there are no viable options: + |-- D 2.0.0, which conflicts with the versions reported above. + diff --git a/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_applies_graph_compression.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_applies_graph_compression.snap new file mode 100644 index 000000000..dec5f04d8 --- /dev/null +++ b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_applies_graph_compression.snap @@ -0,0 +1,14 @@ +--- +source: crates/rattler_libsolv_rs/src/solver/mod.rs +expression: error +--- +The following packages are incompatible +|-- A can be installed with any of the following options: + |-- A 9 | 10 would require + |-- B, which can be installed with any of the following options: + |-- B 42 | 100 would require + |-- C <100, which can be installed with any of the following options: + |-- C 99 +|-- C >100 cannot be installed because there are no viable options: + |-- C 101 | 103, which conflicts with the versions reported above. + diff --git a/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_bluesky_conflict.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_bluesky_conflict.snap new file mode 100644 index 000000000..4bd78675a --- /dev/null +++ b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_bluesky_conflict.snap @@ -0,0 +1,12 @@ +--- +source: crates/rattler_libsolv_rs/src/solver/mod.rs +expression: error +--- +The following packages are incompatible +|-- bluesky-widgets <100 can be installed with any of the following options: + |-- bluesky-widgets 42 would require + |-- suitcase-utils <54, which can be installed with any of the following options: + |-- suitcase-utils 53 +|-- suitcase-utils >=54,<100 cannot be installed because there are no viable options: + |-- suitcase-utils 54, which conflicts with the versions reported above. + diff --git a/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_constrains.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_constrains.snap new file mode 100644 index 000000000..b4c3c5fc4 --- /dev/null +++ b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_constrains.snap @@ -0,0 +1,13 @@ +--- +source: crates/rattler_libsolv_rs/src/solver/mod.rs +expression: error +--- +The following packages are incompatible +|-- A can be installed with any of the following options: + |-- A 9 | 10 would require + |-- B >=50, which can be installed with any of the following options: + |-- B 50 +|-- C cannot be installed because there are no viable options: + |-- C 8 | 10 would constrain + |-- B <50 , which conflicts with any installable versions previously reported + diff --git a/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_incompatible_root_requirements.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_incompatible_root_requirements.snap new file mode 100644 index 000000000..7b407b808 --- /dev/null +++ b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_incompatible_root_requirements.snap @@ -0,0 +1,10 @@ +--- +source: crates/rattler_libsolv_rs/src/solver/mod.rs +expression: error +--- +The following packages are incompatible +|-- A >=5,<10 can be installed with any of the following options: + |-- A 5 +|-- A <4 cannot be installed because there are no viable options: + |-- A 2, which conflicts with the versions reported above. + diff --git a/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_locked_and_excluded.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_locked_and_excluded.snap new file mode 100644 index 000000000..6bfae5807 --- /dev/null +++ b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_locked_and_excluded.snap @@ -0,0 +1,11 @@ +--- +source: crates/rattler_libsolv_rs/src/solver/mod.rs +expression: error +--- +The following packages are incompatible +|-- asdf can be installed with any of the following options: + |-- asdf 1.2.3 would require + |-- C >1, which can be installed with any of the following options: + |-- C 2.0.0 +|-- C 1.0.0 is locked, but another version is required as reported above + diff --git a/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_missing_top_level_dep_1.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_missing_top_level_dep_1.snap new file mode 100644 index 000000000..415bcb27f --- /dev/null +++ b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_missing_top_level_dep_1.snap @@ -0,0 +1,6 @@ +--- +source: crates/rattler_libsolv_rs/src/solver/mod.rs +expression: error +--- +No candidates where found for fghj. + diff --git a/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_missing_top_level_dep_2.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_missing_top_level_dep_2.snap new file mode 100644 index 000000000..a954a6b8a --- /dev/null +++ b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_missing_top_level_dep_2.snap @@ -0,0 +1,6 @@ +--- +source: crates/rattler_libsolv_rs/src/solver/mod.rs +expression: error +--- +No candidates where found for B 14.*. + diff --git a/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_no_candidates_for_child_1.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_no_candidates_for_child_1.snap new file mode 100644 index 000000000..75165dea7 --- /dev/null +++ b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_no_candidates_for_child_1.snap @@ -0,0 +1,8 @@ +--- +source: crates/rattler_libsolv_rs/src/solver/mod.rs +expression: error +--- +asdf cannot be installed because there are no viable options: +|-- asdf 1.2.3 would require + |-- C >1, for which no candidates where found. + diff --git a/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_no_candidates_for_child_2.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_no_candidates_for_child_2.snap new file mode 100644 index 000000000..f732360b4 --- /dev/null +++ b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_no_candidates_for_child_2.snap @@ -0,0 +1,8 @@ +--- +source: crates/rattler_libsolv_rs/src/solver/mod.rs +expression: error +--- +A <1000 cannot be installed because there are no viable options: +|-- A 41 would require + |-- B <20, for which no candidates where found. + diff --git a/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_pubgrub_article.snap b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_pubgrub_article.snap new file mode 100644 index 000000000..cead3467b --- /dev/null +++ b/crates/rattler_libsolv_rs/src/solver/snapshots/rattler_libsolv_rs__solver__test__unsat_pubgrub_article.snap @@ -0,0 +1,16 @@ +--- +source: crates/rattler_libsolv_rs/src/solver/mod.rs +expression: error +--- +The following packages are incompatible +|-- menu can be installed with any of the following options: + |-- menu 1.0.0 would require + |-- dropdown >=1.8.0,<2.0.0, which can be installed with any of the following options: + |-- dropdown 1.8.0 would require + |-- intl 3.0.0.*, which can be installed with any of the following options: + |-- intl 3.0.0 +|-- icons 1.0.0.* can be installed with any of the following options: + |-- icons 1.0.0 +|-- intl 5.0.0.* cannot be installed because there are no viable options: + |-- intl 5.0.0, which conflicts with the versions reported above. + From d04d368504ed77e050ce82a3010d8096e8f0a0e5 Mon Sep 17 00:00:00 2001 From: Bas Zalmstra Date: Fri, 7 Jul 2023 15:56:20 +0200 Subject: [PATCH 5/7] fix: snapshots --- crates/rattler_solve/src/libsolv_c/mod.rs | 2 +- ...olve_dummy_repo_install_non_existent.snap} | 0 ...=> backends__libsolv_c__solve_python.snap} | 2 +- ... => backends__libsolv_c__solve_quetz.snap} | 2 +- ...ckends__libsolv_c__solve_tensorboard.snap} | 2 +- ...ackends__libsolv_c__solve_tensorflow.snap} | 2 +- ...ends__libsolv_c__solve_xtensor_xsimd.snap} | 2 +- ...solve_dummy_repo_install_non_existent.snap | 1 - .../backends__libsolv_rs__solve_python.snap | 1 - ...__libsolv_rs__solve_python_libsolv_rs.snap | 26 ------ .../backends__libsolv_rs__solve_quetz.snap | 1 - ...ckends__libsolv_rs__solve_tensorboard.snap | 1 - ...solv_rs__solve_tensorboard_libsolv_rs.snap | 84 ------------------- ...ackends__libsolv_rs__solve_tensorflow.snap | 1 - ...ends__libsolv_rs__solve_xtensor_xsimd.snap | 1 - ..._libsolv_sys__solve_python_libsolv_rs.snap | 26 ------ ...olv_sys__solve_tensorboard_libsolv_rs.snap | 84 ------------------- 17 files changed, 6 insertions(+), 232 deletions(-) rename crates/rattler_solve/tests/snapshots/{backends__libsolv_sys__solve_dummy_repo_install_non_existent.snap => backends__libsolv_c__solve_dummy_repo_install_non_existent.snap} (100%) rename crates/rattler_solve/tests/snapshots/{backends__libsolv_sys__solve_python.snap => backends__libsolv_c__solve_python.snap} (87%) rename crates/rattler_solve/tests/snapshots/{backends__libsolv_sys__solve_quetz.snap => backends__libsolv_c__solve_quetz.snap} (97%) rename crates/rattler_solve/tests/snapshots/{backends__libsolv_sys__solve_tensorboard.snap => backends__libsolv_c__solve_tensorboard.snap} (95%) rename crates/rattler_solve/tests/snapshots/{backends__libsolv_sys__solve_tensorflow.snap => backends__libsolv_c__solve_tensorflow.snap} (97%) rename crates/rattler_solve/tests/snapshots/{backends__libsolv_sys__solve_xtensor_xsimd.snap => backends__libsolv_c__solve_xtensor_xsimd.snap} (73%) delete mode 100644 crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_python_libsolv_rs.snap delete mode 100644 crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_tensorboard_libsolv_rs.snap delete mode 100644 crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_python_libsolv_rs.snap delete mode 100644 crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_tensorboard_libsolv_rs.snap diff --git a/crates/rattler_solve/src/libsolv_c/mod.rs b/crates/rattler_solve/src/libsolv_c/mod.rs index 301ba1fa7..52fd65c24 100644 --- a/crates/rattler_solve/src/libsolv_c/mod.rs +++ b/crates/rattler_solve/src/libsolv_c/mod.rs @@ -1,4 +1,4 @@ -//! Provides an solver implementation based on the [`libsolv-sys`] crate. +//! Provides an solver implementation based on the [`rattler_libsolv_c`] crate. use crate::{IntoRepoData, SolverRepoData}; use crate::{SolveError, SolverTask}; diff --git a/crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_dummy_repo_install_non_existent.snap b/crates/rattler_solve/tests/snapshots/backends__libsolv_c__solve_dummy_repo_install_non_existent.snap similarity index 100% rename from crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_dummy_repo_install_non_existent.snap rename to crates/rattler_solve/tests/snapshots/backends__libsolv_c__solve_dummy_repo_install_non_existent.snap diff --git a/crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_python.snap b/crates/rattler_solve/tests/snapshots/backends__libsolv_c__solve_python.snap similarity index 87% rename from crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_python.snap rename to crates/rattler_solve/tests/snapshots/backends__libsolv_c__solve_python.snap index e03cbc1f2..5f6a94d24 100644 --- a/crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_python.snap +++ b/crates/rattler_solve/tests/snapshots/backends__libsolv_c__solve_python.snap @@ -1,7 +1,7 @@ --- source: crates/rattler_solve/tests/backends.rs assertion_line: 398 -expression: "solve_real_world::(vec![\"python=3.9\"])" +expression: "solve_real_world::(vec![\"python=3.9\"])" --- - _libgcc_mutex 0.1 conda_forge - _openmp_mutex 4.5 2_gnu diff --git a/crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_quetz.snap b/crates/rattler_solve/tests/snapshots/backends__libsolv_c__solve_quetz.snap similarity index 97% rename from crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_quetz.snap rename to crates/rattler_solve/tests/snapshots/backends__libsolv_c__solve_quetz.snap index 66fdce728..6789185ce 100644 --- a/crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_quetz.snap +++ b/crates/rattler_solve/tests/snapshots/backends__libsolv_c__solve_quetz.snap @@ -1,7 +1,7 @@ --- source: crates/rattler_solve/tests/backends.rs assertion_line: 398 -expression: "solve_real_world::(vec![\"quetz\",])" +expression: "solve_real_world::(vec![\"quetz\",])" --- - _libgcc_mutex 0.1 conda_forge - _openmp_mutex 4.5 2_gnu diff --git a/crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_tensorboard.snap b/crates/rattler_solve/tests/snapshots/backends__libsolv_c__solve_tensorboard.snap similarity index 95% rename from crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_tensorboard.snap rename to crates/rattler_solve/tests/snapshots/backends__libsolv_c__solve_tensorboard.snap index 2f9d6e261..21f07cd16 100644 --- a/crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_tensorboard.snap +++ b/crates/rattler_solve/tests/snapshots/backends__libsolv_c__solve_tensorboard.snap @@ -1,7 +1,7 @@ --- source: crates/rattler_solve/tests/backends.rs assertion_line: 398 -expression: "solve_real_world::(vec![\"tensorboard=2.1.1\",\n \"grpc-cpp=1.39.1\"])" +expression: "solve_real_world::(vec![\"tensorboard=2.1.1\",\n \"grpc-cpp=1.39.1\"])" --- - _libgcc_mutex 0.1 conda_forge - _openmp_mutex 4.5 2_gnu diff --git a/crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_tensorflow.snap b/crates/rattler_solve/tests/snapshots/backends__libsolv_c__solve_tensorflow.snap similarity index 97% rename from crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_tensorflow.snap rename to crates/rattler_solve/tests/snapshots/backends__libsolv_c__solve_tensorflow.snap index 38862d79c..a03a8a152 100644 --- a/crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_tensorflow.snap +++ b/crates/rattler_solve/tests/snapshots/backends__libsolv_c__solve_tensorflow.snap @@ -1,7 +1,7 @@ --- source: crates/rattler_solve/tests/backends.rs assertion_line: 398 -expression: "solve_real_world::(vec![\"tensorflow\"])" +expression: "solve_real_world::(vec![\"tensorflow\"])" --- - _libgcc_mutex 0.1 conda_forge - _openmp_mutex 4.5 2_gnu diff --git a/crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_xtensor_xsimd.snap b/crates/rattler_solve/tests/snapshots/backends__libsolv_c__solve_xtensor_xsimd.snap similarity index 73% rename from crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_xtensor_xsimd.snap rename to crates/rattler_solve/tests/snapshots/backends__libsolv_c__solve_xtensor_xsimd.snap index 12dd70cf4..c946a4172 100644 --- a/crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_xtensor_xsimd.snap +++ b/crates/rattler_solve/tests/snapshots/backends__libsolv_c__solve_xtensor_xsimd.snap @@ -1,7 +1,7 @@ --- source: crates/rattler_solve/tests/backends.rs assertion_line: 398 -expression: "solve_real_world::(vec![\"xtensor\",\n \"xsimd\",])" +expression: "solve_real_world::(vec![\"xtensor\",\n \"xsimd\",])" --- - _libgcc_mutex 0.1 conda_forge - _openmp_mutex 4.5 2_gnu diff --git a/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_dummy_repo_install_non_existent.snap b/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_dummy_repo_install_non_existent.snap index e5cee1cfa..482189a50 100644 --- a/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_dummy_repo_install_non_existent.snap +++ b/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_dummy_repo_install_non_existent.snap @@ -1,6 +1,5 @@ --- source: crates/rattler_solve/tests/backends.rs -assertion_line: 450 expression: err --- Unsolvable( diff --git a/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_python.snap b/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_python.snap index 05ec28349..ce542dda2 100644 --- a/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_python.snap +++ b/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_python.snap @@ -1,6 +1,5 @@ --- source: crates/rattler_solve/tests/backends.rs -assertion_line: 471 expression: "solve_real_world::(vec![\"python=3.9\"])" --- - _libgcc_mutex 0.1 conda_forge diff --git a/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_python_libsolv_rs.snap b/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_python_libsolv_rs.snap deleted file mode 100644 index a57cc1839..000000000 --- a/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_python_libsolv_rs.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: crates/rattler_solve/tests/backends.rs -assertion_line: 450 -expression: "solve_real_world::(vec![\"python=3.9\"])" ---- -- _libgcc_mutex 0.1 conda_forge -- _openmp_mutex 4.5 2_gnu -- bzip2 1.0.8 h7f98852_4 -- ca-certificates 2022.6.15 ha878542_0 -- ld_impl_linux-64 2.36.1 hea4e1c9_2 -- libffi 3.4.2 h7f98852_5 -- libgcc-ng 12.1.0 h8d9b700_16 -- libgomp 12.1.0 h8d9b700_16 -- libnsl 2.0.0 h7f98852_0 -- libsqlite 3.39.2 h753d276_1 -- libuuid 2.32.1 h7f98852_1000 -- libzlib 1.2.12 h166bdaf_2 -- ncurses 6.3 h27087fc_1 -- openssl 3.0.5 h166bdaf_1 -- python 3.9.13 h2660328_0_cpython -- readline 8.1.2 h0f457ee_0 -- sqlite 3.39.2 h4ff8645_1 -- tk 8.6.12 h27826a3_0 -- tzdata 2021e he74cb21_0 -- xz 5.2.6 h166bdaf_0 - diff --git a/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_quetz.snap b/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_quetz.snap index baffefe08..c4cf48e25 100644 --- a/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_quetz.snap +++ b/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_quetz.snap @@ -1,6 +1,5 @@ --- source: crates/rattler_solve/tests/backends.rs -assertion_line: 471 expression: "solve_real_world::(vec![\"quetz\",])" --- - _libgcc_mutex 0.1 conda_forge diff --git a/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_tensorboard.snap b/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_tensorboard.snap index 641a1d88c..f267ff1dc 100644 --- a/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_tensorboard.snap +++ b/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_tensorboard.snap @@ -1,6 +1,5 @@ --- source: crates/rattler_solve/tests/backends.rs -assertion_line: 471 expression: "solve_real_world::(vec![\"tensorboard=2.1.1\",\n \"grpc-cpp=1.39.1\"])" --- - _libgcc_mutex 0.1 conda_forge diff --git a/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_tensorboard_libsolv_rs.snap b/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_tensorboard_libsolv_rs.snap deleted file mode 100644 index 50bf1830b..000000000 --- a/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_tensorboard_libsolv_rs.snap +++ /dev/null @@ -1,84 +0,0 @@ ---- -source: crates/rattler_solve/tests/backends.rs -assertion_line: 450 -expression: "solve_real_world::(vec![\"tensorboard=2.1.1\",\n \"grpc-cpp=1.39.1\"])" ---- -- _libgcc_mutex 0.1 conda_forge -- _openmp_mutex 4.5 2_gnu -- abseil-cpp 20210324.2 h9c3ff4c_0 -- absl-py 1.0.0 pyhd8ed1ab_0 -- aiohttp 3.8.1 py39hb9d737c_1 -- aiosignal 1.2.0 pyhd8ed1ab_0 -- async-timeout 4.0.2 pyhd8ed1ab_0 -- attrs 21.4.0 pyhd8ed1ab_0 -- blinker 1.4 py_1 -- brotlipy 0.7.0 py39hb9d737c_1004 -- bzip2 1.0.8 h7f98852_4 -- c-ares 1.18.1 h7f98852_0 -- ca-certificates 2022.6.15 ha878542_0 -- cachetools 5.0.0 pyhd8ed1ab_0 -- certifi 2022.6.15 py39hf3d152e_0 -- cffi 1.15.1 py39he91dace_0 -- charset-normalizer 2.0.11 pyhd8ed1ab_0 -- click 8.1.3 py39hf3d152e_0 -- cryptography 37.0.4 py39hd97740a_0 -- frozenlist 1.3.1 py39hb9d737c_0 -- google-auth 2.6.0 pyh6c4a22f_1 -- google-auth-oauthlib 0.4.1 py_2 -- grpc-cpp 1.39.1 h850795e_1 -- grpcio 1.46.3 py39h0f497a6_0 -- idna 3.3 pyhd8ed1ab_0 -- importlib-metadata 4.11.4 py39hf3d152e_0 -- ld_impl_linux-64 2.36.1 hea4e1c9_2 -- libblas 3.9.0 16_linux64_openblas -- libcblas 3.9.0 16_linux64_openblas -- libffi 3.4.2 h7f98852_5 -- libgcc-ng 12.1.0 h8d9b700_16 -- libgfortran-ng 12.1.0 h69a702a_16 -- libgfortran5 12.1.0 hdcd56e2_16 -- libgomp 12.1.0 h8d9b700_16 -- liblapack 3.9.0 16_linux64_openblas -- libnsl 2.0.0 h7f98852_0 -- libopenblas 0.3.21 pthreads_h78a6416_1 -- libprotobuf 3.16.0 h780b84a_0 -- libsqlite 3.39.2 h753d276_1 -- libstdcxx-ng 12.1.0 ha89aaad_16 -- libuuid 2.32.1 h7f98852_1000 -- libzlib 1.2.12 h166bdaf_2 -- markdown 3.3.6 pyhd8ed1ab_0 -- multidict 6.0.2 py39hb9d737c_1 -- ncurses 6.3 h27087fc_1 -- numpy 1.23.2 py39hba7629e_0 -- oauthlib 3.2.0 pyhd8ed1ab_0 -- openssl 1.1.1q h166bdaf_0 -- protobuf 3.16.0 py39he80948d_0 -- pyasn1 0.4.8 py_0 -- pyasn1-modules 0.2.7 py_0 -- pycparser 2.21 pyhd8ed1ab_0 -- pyjwt 2.3.0 pyhd8ed1ab_1 -- pyopenssl 22.0.0 pyhd8ed1ab_0 -- pysocks 1.7.1 py39hf3d152e_5 -- python 3.9.13 h9a8a25e_0_cpython -- python_abi 3.9 2_cp39 -- pyu2f 0.1.5 pyhd8ed1ab_0 -- re2 2021.09.01 h9c3ff4c_0 -- readline 8.1.2 h0f457ee_0 -- requests 2.27.1 pyhd8ed1ab_0 -- requests-oauthlib 1.3.1 pyhd8ed1ab_0 -- rsa 4.8 pyhd8ed1ab_0 -- setuptools 65.0.2 py39hf3d152e_0 -- six 1.16.0 pyh6c4a22f_0 -- sqlite 3.39.2 h4ff8645_1 -- tensorboard 2.1.1 py_1 -- tk 8.6.12 h27826a3_0 -- typing-extensions 4.0.1 hd8ed1ab_0 -- typing_extensions 4.0.1 pyha770c72_0 -- tzdata 2021e he74cb21_0 -- urllib3 1.26.8 pyhd8ed1ab_1 -- werkzeug 2.0.3 pyhd8ed1ab_1 -- wheel 0.37.1 pyhd8ed1ab_0 -- xz 5.2.6 h166bdaf_0 -- yarl 1.7.2 py39hb9d737c_2 -- zipp 3.7.0 pyhd8ed1ab_1 -- zlib 1.2.12 h166bdaf_2 - diff --git a/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_tensorflow.snap b/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_tensorflow.snap index 3570844bd..3d05d301d 100644 --- a/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_tensorflow.snap +++ b/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_tensorflow.snap @@ -1,6 +1,5 @@ --- source: crates/rattler_solve/tests/backends.rs -assertion_line: 471 expression: "solve_real_world::(vec![\"tensorflow\"])" --- - _libgcc_mutex 0.1 conda_forge diff --git a/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_xtensor_xsimd.snap b/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_xtensor_xsimd.snap index 34d760a49..5ac09ddfd 100644 --- a/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_xtensor_xsimd.snap +++ b/crates/rattler_solve/tests/snapshots/backends__libsolv_rs__solve_xtensor_xsimd.snap @@ -1,6 +1,5 @@ --- source: crates/rattler_solve/tests/backends.rs -assertion_line: 471 expression: "solve_real_world::(vec![\"xtensor\",\n \"xsimd\",])" --- - _libgcc_mutex 0.1 conda_forge diff --git a/crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_python_libsolv_rs.snap b/crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_python_libsolv_rs.snap deleted file mode 100644 index 3a6f3d66c..000000000 --- a/crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_python_libsolv_rs.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: crates/rattler_solve/tests/backends.rs -assertion_line: 375 -expression: "solve_real_world::(vec![\"python=3.9\"])" ---- -- _libgcc_mutex 0.1 conda_forge -- _openmp_mutex 4.5 2_gnu -- bzip2 1.0.8 h7f98852_4 -- ca-certificates 2022.6.15 ha878542_0 -- ld_impl_linux-64 2.36.1 hea4e1c9_2 -- libffi 3.4.2 h7f98852_5 -- libgcc-ng 12.1.0 h8d9b700_16 -- libgomp 12.1.0 h8d9b700_16 -- libnsl 2.0.0 h7f98852_0 -- libsqlite 3.39.2 h753d276_1 -- libuuid 2.32.1 h7f98852_1000 -- libzlib 1.2.12 h166bdaf_2 -- ncurses 6.3 h27087fc_1 -- openssl 3.0.5 h166bdaf_1 -- python 3.9.13 h2660328_0_cpython -- readline 8.1.2 h0f457ee_0 -- sqlite 3.39.2 h4ff8645_1 -- tk 8.6.12 h27826a3_0 -- tzdata 2021e he74cb21_0 -- xz 5.2.6 h166bdaf_0 - diff --git a/crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_tensorboard_libsolv_rs.snap b/crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_tensorboard_libsolv_rs.snap deleted file mode 100644 index 502c49d17..000000000 --- a/crates/rattler_solve/tests/snapshots/backends__libsolv_sys__solve_tensorboard_libsolv_rs.snap +++ /dev/null @@ -1,84 +0,0 @@ ---- -source: crates/rattler_solve/tests/backends.rs -assertion_line: 375 -expression: "solve_real_world::(vec![\"tensorboard=2.1.1\",\n \"grpc-cpp=1.39.1\"])" ---- -- _libgcc_mutex 0.1 conda_forge -- _openmp_mutex 4.5 2_gnu -- abseil-cpp 20210324.2 h9c3ff4c_0 -- absl-py 1.0.0 pyhd8ed1ab_0 -- aiohttp 3.8.1 py39hb9d737c_1 -- aiosignal 1.2.0 pyhd8ed1ab_0 -- async-timeout 4.0.2 pyhd8ed1ab_0 -- attrs 21.4.0 pyhd8ed1ab_0 -- blinker 1.4 py_1 -- brotlipy 0.7.0 py39hb9d737c_1004 -- bzip2 1.0.8 h7f98852_4 -- c-ares 1.18.1 h7f98852_0 -- ca-certificates 2022.6.15 ha878542_0 -- cachetools 5.0.0 pyhd8ed1ab_0 -- certifi 2022.6.15 py39hf3d152e_0 -- cffi 1.15.1 py39he91dace_0 -- charset-normalizer 2.0.11 pyhd8ed1ab_0 -- click 8.1.3 py39hf3d152e_0 -- cryptography 37.0.4 py39hd97740a_0 -- frozenlist 1.3.1 py39hb9d737c_0 -- google-auth 2.6.0 pyh6c4a22f_1 -- google-auth-oauthlib 0.4.1 py_2 -- grpc-cpp 1.39.1 h850795e_1 -- grpcio 1.46.3 py39h0f497a6_0 -- idna 3.3 pyhd8ed1ab_0 -- importlib-metadata 4.11.4 py39hf3d152e_0 -- ld_impl_linux-64 2.36.1 hea4e1c9_2 -- libblas 3.9.0 16_linux64_openblas -- libcblas 3.9.0 16_linux64_openblas -- libffi 3.4.2 h7f98852_5 -- libgcc-ng 12.1.0 h8d9b700_16 -- libgfortran-ng 12.1.0 h69a702a_16 -- libgfortran5 12.1.0 hdcd56e2_16 -- libgomp 12.1.0 h8d9b700_16 -- liblapack 3.9.0 16_linux64_openblas -- libnsl 2.0.0 h7f98852_0 -- libopenblas 0.3.21 pthreads_h78a6416_1 -- libprotobuf 3.16.0 h780b84a_0 -- libsqlite 3.39.2 h753d276_1 -- libstdcxx-ng 12.1.0 ha89aaad_16 -- libuuid 2.32.1 h7f98852_1000 -- libzlib 1.2.12 h166bdaf_2 -- markdown 3.3.6 pyhd8ed1ab_0 -- multidict 6.0.2 py39hb9d737c_1 -- ncurses 6.3 h27087fc_1 -- numpy 1.23.2 py39hba7629e_0 -- oauthlib 3.2.0 pyhd8ed1ab_0 -- openssl 1.1.1q h166bdaf_0 -- protobuf 3.16.0 py39he80948d_0 -- pyasn1 0.4.8 py_0 -- pyasn1-modules 0.2.7 py_0 -- pycparser 2.21 pyhd8ed1ab_0 -- pyjwt 2.3.0 pyhd8ed1ab_1 -- pyopenssl 22.0.0 pyhd8ed1ab_0 -- pysocks 1.7.1 py39hf3d152e_5 -- python 3.9.13 h9a8a25e_0_cpython -- python_abi 3.9 2_cp39 -- pyu2f 0.1.5 pyhd8ed1ab_0 -- re2 2021.09.01 h9c3ff4c_0 -- readline 8.1.2 h0f457ee_0 -- requests 2.27.1 pyhd8ed1ab_0 -- requests-oauthlib 1.3.1 pyhd8ed1ab_0 -- rsa 4.8 pyhd8ed1ab_0 -- setuptools 65.0.2 py39hf3d152e_0 -- six 1.16.0 pyh6c4a22f_0 -- sqlite 3.39.2 h4ff8645_1 -- tensorboard 2.1.1 py_1 -- tk 8.6.12 h27826a3_0 -- typing-extensions 4.0.1 hd8ed1ab_0 -- typing_extensions 4.0.1 pyha770c72_0 -- tzdata 2021e he74cb21_0 -- urllib3 1.26.8 pyhd8ed1ab_1 -- werkzeug 2.0.3 pyhd8ed1ab_1 -- wheel 0.37.1 pyhd8ed1ab_0 -- xz 5.2.6 h166bdaf_0 -- yarl 1.7.2 py39hb9d737c_2 -- zipp 3.7.0 pyhd8ed1ab_1 -- zlib 1.2.12 h166bdaf_2 - From 248d3dfdd6589958b45e4a6cf4615d8b48f0a461 Mon Sep 17 00:00:00 2001 From: Bas Zalmstra Date: Fri, 7 Jul 2023 16:05:23 +0200 Subject: [PATCH 6/7] fix: benches --- crates/rattler_solve/benches/bench.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/rattler_solve/benches/bench.rs b/crates/rattler_solve/benches/bench.rs index c1c5358aa..3d5169a3c 100644 --- a/crates/rattler_solve/benches/bench.rs +++ b/crates/rattler_solve/benches/bench.rs @@ -25,6 +25,7 @@ fn read_sparse_repodata(path: &str) -> SparseRepoData { Channel::from_str("dummy", &ChannelConfig::default()).unwrap(), "dummy".to_string(), path, + None, ) .unwrap() } @@ -51,7 +52,7 @@ fn bench_solve_environment(c: &mut Criterion, specs: Vec<&str>) { let names = specs.iter().map(|s| s.name.clone().unwrap()); let available_packages = - SparseRepoData::load_records_recursive(&sparse_repo_datas, names).unwrap(); + SparseRepoData::load_records_recursive(&sparse_repo_datas, names, None).unwrap(); #[cfg(feature = "libsolv_c")] group.bench_function("libsolv_c", |b| { From 336e4e18f69b84d468d460ef75d728085d793feb Mon Sep 17 00:00:00 2001 From: Bas Zalmstra Date: Fri, 7 Jul 2023 16:07:10 +0200 Subject: [PATCH 7/7] fix: enable all targets when building --- .github/workflows/rust-compile.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust-compile.yml b/.github/workflows/rust-compile.yml index f7a4d8002..d3213f609 100644 --- a/.github/workflows/rust-compile.yml +++ b/.github/workflows/rust-compile.yml @@ -26,7 +26,7 @@ jobs: submodules: recursive - uses: actions-rust-lang/setup-rust-toolchain@v1 - name: Run clippy - run: cargo check + run: cargo check --all-targets check-rustdoc-links: name: Check intra-doc links @@ -158,7 +158,7 @@ jobs: with: use-cross: ${{ matrix.job.use-cross }} command: build - args: --target=${{ matrix.job.target }} ${{ steps.build-options.outputs.CARGO_BUILD_OPTIONS}} --features ${{ env.DEFAULT_FEATURES }} + args: --target=${{ matrix.job.target }} --all-targets ${{ steps.build-options.outputs.CARGO_BUILD_OPTIONS}} --features ${{ env.DEFAULT_FEATURES }} - name: Set test options id: test-options