-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhanced Package Installation with Improved Dependency Management and Extended Environment Configuration #84
Open
tiff-ritz
wants to merge
39
commits into
heroku:main
Choose a base branch
from
tiff-ritz:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added a FromStr implementation to debian::MultiarchName Implment functionality to load the environment variables associate with packages from the project.toml file
# This is the 1st commit message: added code to set GIT_EXEC_PATH while installing packages. Added a FromStr implementation to debian::MultiarchName in order to implement a unit test document adding GIT_EXEC_PATH in the readme table of environment variables # This is the commit message #2: add setting of GS_LIB
Added a FromStr implementation to debian::MultiarchName Implment functionality to load the environment variables associate with packages from the project.toml file use PACKAGE_ENV_VARS constand to map default env vars to be defined if the package is in the project.toml file - these can be overwritten by the values in the project.toml file define the package_env_vars before the env vars in the project.toml file update README to reflect the PACKAGE_ENV_VARS testing the buildpack, added a variable for skipped_packages. Will incorporate that into install_packages move the env logic into configure_layer_environment. Iterate through the skipped_packages to make sure all the env vars are set and the post install command are run flushed out a test in order to accomindate the new parameters passed to configure_layer_environment finished the test for skipped packages update the unit test to use a fixture to create the env correctly use a fixture for the test project.toml file; update the README
remove configurable env and post commands,
…actual deb packages to test instead of trying to mock them
…kage installed first in order to install correctly, added tests for my changes
extract the control.tar to get postinst scripts
… use of PACKAGE_ENV_VAR and SPECIAL_CASE_MAP
…verify the config env from project.toml
…ether to reuse the package cache
unneeded and takes a long time
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of Changes
This pull request introduces several enhancements and improvements to the
buildpack-deb-packages
project. The package installation process has been enhanced with the addition of support for default and configurable environment variables. Dependency management has been improved with better logic for handling special case packages that require additional package installation. The metadata used for caching has been improved with the addition of atimestamp
Cache Management was improved with the introduction of an environment variable.Detailed Changes
A
tokio
runtime has been introduced for asynchronous operations.The package index creation process has been enhanced with the addition of a
timestamp
for updating and caching package sources.PACKAGE_CACHE_DAYS
defines the number of days for which package cache is considered valid. The value of0
will cause the cache to be recreated. Unit tests for package index creation functions have also been added.Dependency management has been improved with the addition of support for special case constant defining packages and their required packages in order to cover all dependencies. Unit tests for dependency resolution functions have been added.
Error handling has been enhanced with the additional of new error types and messages for the new functionality. Unit tests for error handling functions have been added.
The package installation process has been enhanced with the addition of a
timestamp
for updating and caching packages. ThePACKAGE_CACHE_DAYS
environment variable has been introduced which helps control how frequently the package cache is refreshed to ensure the most up-to-date packages are used. Support for defining environment variables in theproject.toml
has been introduced. Thepackage_env_vars
constant and function has been added to define environment variables for specific packages. The logic for downloading and extracting packagecontrol.tar
has been improved, and theexecute_postinst_script
function has been introduced to handle post-installation scripts. The logic for configuring environment variables for installed packages has been enhanced, and unit tests for package installation functions have been added.The README.md has been updated to contain more documentation for the new features. Separate documentation has been created for special case map, default package environment variables, and configurable environment variables
Tests
Unit tests have been added for error handling functions in
src/errors.rs
, package installation functions insrc/install_packages.rs
, package index creation functions insrc/create_package_index.rs
, and dependency resolution functions insrc/determine_packages_to_install.rs
. Integration tests have been added insrc/tests/integration_tests.rs
.Miscellaneous
Code formatting and cleanup have been applied across all modified files. Unnecessary comments and unused imports have been removed. Code readability has been improved by adding comments and structuring code logically.
New Features
The
PACKAGE_ENV_VARS
constant is a new feature insrc/install_packages.rs
. It defines environment variables for specific packages.The
SPECIAL_CASE_MAP
constant is a new feature insrc/determine_packages_to_install.rs
. It maps special case packages to their required packages.The
project.toml
has been updated to support enhanced package installation and environment variable configuration.