aboutsummaryrefslogtreecommitdiff
path: root/src/conda.c
Commit message (Collapse)AuthorAgeFilesLines
* Ensure the temporary output file does not lingerpypi-existence-checkJoseph Hunkeler2024-08-201-1/+2
|
* Rename python_package_exists to pip_index_providesJoseph Hunkeler2024-08-201-1/+1
| | | | | * Document the function prototype * Add missing comments in micromamba structure
* Disable outdated conda notificationsJoseph Hunkeler2024-08-191-6/+7
| | | | * The latest version isn't always the greatest. Don't give the end-user any ideas. Just use whatever the installer provides... quietly
* Add python_package_exists() functionJoseph Hunkeler2024-08-171-0/+66
| | | | | * Poll pypi.org or compatible index to see if a package exists * Returns non-zero on success
* Implement TODO item (#32)Joseph Hunkeler2024-08-171-11/+25
| | | | * The array of packages now used to check the runtime environment instead of two separate scanning methods * Renamed tools array to: conda_minimum_viable_tools
* Unit tests (#12)Joseph Hunkeler2024-07-151-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change return value of conda_setup_headless() from void to int * Replace exit() with return; * Return early if unpacking the micromamba binary fails * Exit program when pointer to INIFILE is NULL. * Validation function cannot otherwise proceed * The way the logic is set up I've decided to duplicate the installation code for now until I find time to revise it * The only meaningful difference between a "fresh start" and reusing the conda installation is a rmtree(). * Exposes STASIS_DOWNLOAD_TIMEOUT environment variable * Sets the connection timeout for libcurl to 30, instead of 300. * Export ini_section_create() function * Add download() tests * Add conda_*() tests * Add boilerplate source file for test framework * Fixes segfault reported by @GeorgeJCleary (#10) * The key is now an array index. When key is -1, the env variable is not defined. * Free resources only when continue on error is disabled (#11) * Fix segfault due to premature shutdown/cleanup * If conda_setup_headless cannot succeed, die * Set STASIS_SYSCONFDIR for tests
* Add github.c and github.h (#9)Joseph Hunkeler2024-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add github.c and github.h * Implements get_github_release_notes() * Remove unused variables * Fix circular dependency on tplfunc_frame * Remove predeclaration of tplfunc_frame * tpl_register_func accepts pointer to void instead * tpl_register_func sets maximum number of arguments * Frame is generated within tpl_register_func * Improve template function error handling and return/output management * Remove redundant extern statement * Include github.h and template_func_proto.h in core.h * Expose get_github_release_notes_tplfunc_entrypoint function to template engine * Add template_func_proto.c and template_func_proto.h * Replace free() with guard variant * Fix test_template::test_tpl_register_func * Fix tests * Fix tests * cmd should be at least PATH_MAX in size. * Magic number caused failure to install conda with a long installation path * Implement get_github_release_notes_auto function that bases release note data off test contexts * Disable overwriting releases by default * Add automatic release note generation function call to release_notes.md.in * Fix test_tpl_register_func() * Add enough space for tar command plus a path * Fix circular include * Github functions do not require access to core.h anyway * Add comments to union * Update README to mention template function availability * Add EnvCtl structure * Add runtime checks to avoid running all the way to the end only to be met with a configuration error. * Rename GITHUB to GH * Development docs pre-rough-draft
* Pass .ci_support/plat_arch_.yaml to conda-build (#8)Joseph Hunkeler2024-06-241-5/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Pass .ci_support/plat_arch_.yaml to conda-build * Fixes a few outstanding leaks in delivery context * Move micromamba function out of stasis_indexer.c * Adjust code in the indexer to accommodate the move. The function now expects a MicromambaInfo structure as its first argument. * Add missing warning message * User is informed when pandoc is not available for HTML page generation * Initialize workdir_template string to zero * Add micromamba program to runtime PATH * Expose storage.tools_dir to template engine * Remove dead code * Fix wording in comment * Fix conda-forge builds * Pass their .ci_support configurations to conda-build in order to fully set up their build runtime environment * Add get_cpu_count() * Exposes STASIS_CPU_COUNT and CPU_COUNT to the runtime environment * Implements conda reactivation template string * {{ workaround.conda_reactivate }} * This is useful to call after installing any conda packages within a test.script * Fix conda runtime inside of test.script * This ensures conda and mamba are fully initialized. * Previous behavior only placed the commands on the PATH but didn't provide any shell macros (i.e. undefined behavior) * Document CPU_COUNT and workaround.conda_reactivate
* Rebrand OhMyCal (OMC) as STASIS (#7)Joseph Hunkeler2024-06-211-13/+11
|
* Clean upJoseph Hunkeler2024-05-021-2/+3
| | | | | * Add comment * Remove unused code
* Increase buffer size to match input argument sizesJoseph Hunkeler2024-04-101-1/+1
|
* Disable conda's sanity checks. (i.e. don't verify every transaction)Joseph Hunkeler2024-04-021-5/+6
|
* Changes to strlist_*() functions:Joseph Hunkeler2024-04-021-2/+2
| | | | | Functions that modify the input StrList have been refactored to use `struct StrList **` instead of `struct StrList *`. * Fixes realloc error handling
* Use GENERIC_ARRAY_FREE instead of split_free()Joseph Hunkeler2024-03-221-1/+1
|
* Use do/while in guard_* macros to make them behave more like functionsJoseph Hunkeler2024-03-101-4/+4
|
* Fixes several memory leaksJoseph Hunkeler2024-02-261-0/+4
|
* Refactor std{out,err} to f_std{out,err}Joseph Hunkeler2024-02-061-2/+2
| | | | * Bare stdout and stderr, even as struct members, tend to conflict with numerous libc implementations.
* Use shell() in place of shell2()Joseph Hunkeler2024-01-291-1/+1
|
* Install conda and pip packagesJoseph Hunkeler2023-12-101-9/+48
|
* Add function conda_check_required()Joseph Hunkeler2023-12-101-0/+37
| | | | * First pass. Needs work.
* Set solver to libmamba by defaultJoseph Hunkeler2023-12-101-0/+1
|
* Set conda to quiet mode when verbosity is not toggledJoseph Hunkeler2023-12-101-1/+7
|
* Use "env" program instead of "printenv" shell built-in to read environmentJoseph Hunkeler2023-12-101-1/+1
|
* Use TMPDIR, and fail when script cannot be executed within that filesystemJoseph Hunkeler2023-11-201-1/+4
|
* Implements slightly improved error handlingJoseph Hunkeler2023-11-201-27/+32
| | | | | | | * Return status from conda_ and delivery_ functions * Caller prints meaningful error, and handles it * Enable warnings during compilation * Squelch format-truncation warning -- those strings are extremely unlikely to overflow (famous last words)
* Replaces BUFSIZ with OMC_BUFSIZJoseph Hunkeler2023-11-201-1/+1
|
* Consolidate conda_setup_headless() from main.cJoseph Hunkeler2023-10-311-1/+15
|
* Parse output of "printenv -0" to preserve environment correctlyJoseph Hunkeler2023-10-311-10/+30
| | | | | | * Use fgetc in place of fgets * Split key/value on '=' * Issue warnings on invalid key/value
* Initial commitJoseph Hunkeler2023-10-261-0/+176