Commit Graph

3187 Commits

Author SHA1 Message Date
Antoine Prouvost 4db0c06cfa
Add (some) solver Database tests (#3185)
* Add test_request.cpp

* Add test_solution.cpp

* Fix wrong forward declaration

* Add libsolv database test
2024-02-09 10:32:20 -05:00
Antoine Prouvost afdb5a185d
Simple logging fix (#3184) 2024-02-08 23:02:22 -05:00
Antoine Prouvost daeb96cb08
Make libsolv wrappers into standalone library (#3181)
* Move solv-cpp into standalone library

* Remove mamba namespace from solv-cpp

* Switch solv-cpp to object library

* Install solv-cpp object library

* Fix doctest

* Fix windows path
2024-02-08 10:49:53 -05:00
Antoine Prouvost d20d176b86
Rename MPool into solver::libsolv::Database (#3180)
* Move only MPool

* Rename MPool > Database

* Move Database to solver::libsolv

* Add missing explicit

* Rename pool in function names

* Rename core/pool.hpp package_database_loader
2024-02-08 16:41:11 +01:00
Hind-M 67fd10a830
Automate releases (`CHANGELOG.md` updating) (#3179)
* Add script to automate updating CHANGELOG.md for releasing

* Add PRs label check workflow
2024-02-08 09:35:18 +01:00
Antoine Prouvost a2a2d26445
Simplify MPool Interface (#3177)
* Remove some use to MPool::ChannelContext

* Explicit palette in UnSolvable

* Explicit option for use_only_tar_bz2 in Pool

* Remove context from Pool

* Remove Context capture in Pool

* Remove ChannelContext capture in Pool

* Silence warnings

* Chane Unsolvable to use solv::ObjPool

* Fine grain control of MPoll raw access

* Remove MPool::id2pkginfo

* Remove MPool::matchspec2id and select_solvables

* Remove MPool::dep2str

* Auto create_whatprovides in repoquery

* Remove MPool::create_whatprovides

* Change MPool::remove_repo API

* Private libsolv
2024-02-07 09:25:37 -05:00
Antoine Prouvost b3cb456764
Clean libsolv use in Transaction (#3171)
* Take by value and move in TransactionContext

* Refactor Transaction from Lockfile

* Refactor remove/install Transaction ctor

* Add MPool::for_each_package_in_repo

* Attempt fix forced remove

* Move Python search in MPool not ObjPool

* Use solver functions

* Move Solution post-processing to solver

* Remove Pool, Context, ChannelContext captrure from Transaction
2024-02-05 13:40:47 -05:00
Antoine Prouvost 23b90a9b73
Rewrite Query with Pool functions (wrapping libsolv) (#3168)
* Add MPool::for_each_package_matching

* Use MPool::for_each_package_matching in self-update

* Add test for pool.select_solvables

* Add MPool::for_each_package_depending_on

* Implement some queries with MPool

* Reorganize query.cpp

* Refactor Query Graph walk to not use libsolv

* Rewrite Query::whoneeds in PkgInfo space

* Remove unused functions

* Improve string param
2024-02-05 11:45:48 -05:00
Hind Montassif 6618349cba release libmamba 2.0.0alpha2, libmambapy 2.0.0alpha2, micromamba 2.0.0alpha2 2024-02-02 17:37:25 +01:00
Bela Stoyan 4075f0b58d
add manually given .tar.bz2 / .conda packages to solver pool (#3164)
* add packages to solver pool

* lint
2024-02-01 13:51:06 -05:00
Antoine Prouvost 551540ba0a
Improve Query API (#3167)
* Clean Query

* Bind Query alike to C++
2024-02-01 10:21:41 -05:00
Antoine Prouvost a182b1d453
Bind solver::libsolv::UnSolvable (#3166) 2024-01-31 16:34:55 -05:00
Antoine Prouvost 9f1b5b7e06
Solver sort deps (#3163)
* Improve Solver::solve

* Add Solver request ordering

* Refactor context solver flags

* Add config option order_solver_request

* Fix config

* Change pin test expected solution

* Refactor custom variant comparison

* Add 2.0 order_solver_request doc
2024-01-31 16:21:29 -05:00
Antoine Prouvost d4c9f96dea
Proper sorting of display actions (#3165)
* Add variant compare

* Sort actions not strings
2024-01-31 14:27:22 -05:00
Antoine Prouvost dedf072874
Split Solver and Unsolvable (#3156)
* No capture MPool in Solver

* Solution in MSolver

* Change MTransaction solver ctor

* Split UnSolvable from MSolver

* Implement MSolver Outcome

* Private SolverProblem

* Move UnSolvable to solve::libsolv

* Move sat* solver::problems_graph

* Clean test_problems_graph

* Move MSolver to solver::libsolv

* Rename MSolver > Solver

* Add minimal 2.0 doc

* Bind solver::Solution

* Move problems_graph bindings to libmambapy.solver

* Change Solver namespace

* Move Solver bindings to libmambapy.solver.libsolv
2024-01-30 22:20:36 +01:00
Johan Mabille f7c763082d
Implemented support for mirrors (#3157)
* Implemented support for mirrors

* Changes according to reviews
2024-01-30 18:31:07 +01:00
Julien Jerphanion b8ceffeab0
Remove outdated commented code snippet (#3160)
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2024-01-30 13:23:54 +01:00
Johan Mabille a63587da2e
Moved download related files to dedicated folder (#3155) 2024-01-25 20:45:54 +01:00
Antoine Prouvost b270d9f6b3
Refactor solver flags (#3153)
* Rename Solver keep_specs > keep_user_specs

* Refactor hide libsolv solver flags

* Move Solver flags in Request
2024-01-25 17:07:54 +01:00
Antoine Prouvost a310d31da9
Improve Solution usage (#3148)
* Rename Solution > solver::Solution

* Try noarch relink in solution space

* Remove dead code

* Move relink computation to helpers

* Refactor find_installed_python

* Add Loop control break to Solution

* Refactor find_new_python_in_solution

* Add  solution_needs_python_relink

* Change Py relink decision

* Remove dead relink_noarch

* Delete TransationContext copy ctor in favor of default move ctor.

* Refactor transaction_to_solution

* Refactor MSolver::add_request

* Free MSolver::add_reinstall_job

* Refactor Solution filter

* Refactor is_any_of

* Add solver Request for_each_of

* Remove MSolcer remove/installed_specs

* Refactor add_job_impl

* Use expected_t in add_job_impl

* Remove MSolver::m_jobs

* Refactor request_to_decision_queue
2024-01-25 15:23:15 +01:00
Antoine Prouvost a190d9394c
Solver Request (#3141)
* Change type for MSolver::add_pin

* Add Solver Request 1

* Add Solver Request 2

* Add Solver Request 3

* Cleanup retry flags

* Remove constant parameter

* Add Solver Request 4

* Add Request::Freeze

* Add Request::Keep

* Add Request::UpdateAll

* Remove MSolver::add_global_job

* Use MSolver::add_request for remove

* Remove MSolver::add_jobs

* Remove MSolver::add_pins

* Add api/install pins in request

* Add api/update pins in request

* Remove MSolver::add_pin

* Remove dead MSovler neuter_specs & pinned_specs

* Move Request to solver::Request

* Bind solver::Request

* Apply review comments
2024-01-23 13:38:11 +01:00
Antoine Prouvost 75b0dc48c0
Sort transaction table entries (#3146) 2024-01-23 09:29:39 +01:00
Antoine Prouvost e8793e59e6
Solver improvements (#3140)
* Change serializing of pin

* Change pin names

* Rename MSolverProblem > SolverProblem

* Move pool_add_matchspec to helpers

* Move transaction_to_solution to helpers

* Remove MSolver::add_constraints

* Move pool_add_pin to helpers

* Remove MSolver pointer convertion

* Remove MSolver macro flags
2024-01-19 10:04:45 +01:00
Antoine Prouvost 81504b5614
Explcit transaction duplicate code (#3138)
* Add channel and subdir to PackageInfo::from_url

* Remove duplicate code
2024-01-18 11:03:38 +01:00
Antoine Prouvost 0324bd74b0
No M (#3137) 2024-01-18 08:44:23 +01:00
Antoine Prouvost a29f500d17
Fix expected caster (#3136) 2024-01-17 16:54:59 +01:00
Antoine Prouvost 7d6856e9b5
MRepo refactor (#3118)
* Rename Enum members in MRepo

* use solv::Pool in MRepo

* Free MRepo add_pip_as_python_dependency

* Free MRepo repodata reading

* Free MRepo read_solv

* Free MRepo write_solv

* Remove MRepo constructor

* Remove MPool capture from MRepo

* Add missing pip dependency

* Refactor solv file serialization

* No lock on non-existant files

* Cleanup dead code

* write_solve create-directories

* Clean MRepo member functions

* Decouple MRepo and Pool

* Finetune Clang-format

* Add filename location to error

* Do not fail on solv file write

* Load new pool loader for repodata and .solv files

* Remove repo name in favor of URL

* Refactor MRepo index loading

* Fix SubDirData.writable_solv_cache

* Fix solv file loading

* Lock repodata.json while reading metadata

* Refactor expected in load_subdir_in_pool

* use expected in solver helpers

* Refactor helpers functions and error messages in Repo

* Add MPool::create_repo_from_packages

* Use load_installed_packages_in_pool

* Remove MRepo ctor

* Fix rebase

* Refactor MRepo::priority

* Update Taskfile realpath to work on MacOS

* Fix virtual packages being removed

* Move MRepo::priority to MPool

* Rename MRepo > solver::libsolv::RepoInfo

* Move RepoInfo parameters for its own library

* Move make_package_info to helpers

* Add libmambapy.solver.libsolv

* Add solver::libsolv::Priorities op

* Bind libsolv parameters

* Bind RepodataOrigin

* Merge libsolv/serialization and libsolv/parameters

* Bind new MPool methods

* Add RepoInfo op

* Add RepoInfo changes to log

* Rename attribute

* Remove RepoInfo::repo
2024-01-17 16:44:47 +01:00
Antoine Prouvost cc95098a57
Add expected caster to Union (#3135) 2024-01-17 16:44:21 +01:00
Josh Chorlton 7c70ca7fed
handle other deps in multiple env files (#3096) 2024-01-17 15:28:48 +01:00
pwnfan 43567a768c
Fix verbose and strange prefix in Powershell (#3116) 2024-01-17 13:52:48 +01:00
Antoine Prouvost 0b5e2d013b
Refactor test_remove.py to use fixture (#3131)
* test_depends_local

* Fix test yaml_env

* Refactor TestRemove to use fixtures

* Refactor TestRemoveConfig to use fixtures
2024-01-16 17:51:36 +01:00
Antoine Prouvost a534d49fea
Revert "Fix info and debug logging" (#3133) 2024-01-16 15:52:14 +01:00
Ben Moss 1e7c369128
Fix info and debug logging (#3127)
* Fix info and debug logging in libmamba

Fixes #3112

* Don't use compile-time loggers

---------

Co-authored-by: Ben Moss <bmoss40@bloomberg.com>
2024-01-16 15:38:44 +01:00
Antoine Prouvost 6f315a26df
Add MacOS DNS issue logging (#3130) 2024-01-16 13:26:48 +01:00
Antoine Prouvost 8e9b376161
Move util_random.hpp > util/random.hpp (#3129)
* Move util_random.hpp > util/random.hpp

* Use new random in libmamba

* Use template instanciation instead
2024-01-16 10:14:45 +01:00
Johan Mabille 67f36d4a48
Added mirrored channels (#3125) 2024-01-15 14:57:43 +01:00
Antoine Prouvost 8ab10efa07
Pool channel match (#3122)
* Add Match return type to Channel::contains_package

* Simplify channel specific matchspec in Pool

* (Dirty) fix force reinstall
2024-01-11 15:07:54 +01:00
Antoine Prouvost f72364d404
Warning around manual install and add ref to conda-libmamba (#3119)
* Remove confusing manual install instructions

* Fix doc errors

* Add reference to Conda libmamba solver

* Restore manual install and add warning
2024-01-11 11:27:06 +01:00
Antoine Prouvost 43e24a864d
Add Channel::contains_package (#3121)
* Add CondaURL literals

* Add Channel::contains_package

* Fix test case name

* Bind Channel::contains_package
2024-01-11 10:10:36 +01:00
Antoine Prouvost 13d034147f
Rename ChannelSpec > UndefinedChannel (#3117)
* Rename ChannelSpec > UndefinedChannel

* Rename UndefinedChannel > UnresolvedChannel
2024-01-09 13:52:23 +01:00
Antoine Prouvost 328457276a
Add some PackageInfo tests" (#3115)
* Add PackageInfo::from_url

* Add PakcageInfo tests

* Bind PackageInfo::from_url
2024-01-09 09:38:01 +01:00
Antoine Prouvost 6bf43a6d4f
Change PackageInfo types (#3113)
Use NoArchType in PackageInfo
2024-01-08 17:52:17 +01:00
Ben Moss b849683139
Add instructions for gnu coreutils on OSX (#3111)
Fixes #3110

Co-authored-by: Ben Moss <bmoss40@bloomberg.com>
2024-01-08 16:35:08 +01:00
Antoine Prouvost 717456890a
Move PackageInfo in specs:: (#3109)
* Move PackageInfo in specs::

* Move PackageInfo in specs::

* Rename PackageInfo::url > PackageInfo::package_url

* Add changelog entry

* Add MatchSpec migration help
2024-01-08 16:06:22 +01:00
Antoine Prouvost dae5e0e378
NoArchType as standalone enum (#3108)
* NoArch as standalone enum

* Bind NoArchType
2024-01-08 14:26:42 +01:00
Antoine Prouvost 53a5171360
Clean PackageInfo interface (#3103)
* Refactor PackageInfo operator==

* Remove unused headers

* Simplify PackageInfo interface

* Move PackageInfo signature order

* Change type for PackageInfo::defaulted_keys

* Use nlohman::from_json for PackageInfo

* Use nlohman::to_json for PackageInfo

* Fallback in PackageInfo::str

* Rename PackageInfo::fn > filename
2024-01-05 18:26:51 +01:00
Antoine Prouvost f99c4288c6
Remove micromamba shell init -p (#3092)
* Remove micromamba shell init -p

* Fix rc content
2024-01-05 14:07:11 +01:00
Antoine Prouvost 1633630e68
Refactor MatchSpec unlikey data (#3099)
* Fix test names

* Hide MatchSpec implementation detail

* Add heap_optional

* Refactor MatchSpec unlikely members

* Make private use of MatchSpec bracket

* Refactor MatchSpec switch

* Remove map from MatchSpec
2024-01-04 18:14:21 +01:00
Antoine Prouvost 276321427e
Add BuildNumberSpec (#3098)
* Add BuildNumberSpec

* Fix test case name

* use BuildNumberSpec in MatchSpec

* Fix BuildNumberSpec

* Simplify BuildNumberPredicate
2024-01-04 11:57:58 +01:00
Johan Mabille 1eabb0a293 Upper bound on Sphinx to be compatible with Breathe 2024-01-03 10:17:45 +01:00