Skip to content

Refactored config system and fixed config issue

Benjamin Winger requested to merge bmwinger/portmod:config_extraneous_fix into master

Config system has been moved to its own file and now has a (reasonably thorough) test. To support integration tests, we now store globals in an environment class so that the values can't be imported directly Instead, you should import the env class and access its members, allowing modules to redefine values properly. This allows tests (and in future a system that allows concurrent setups) to redirect file modifications to a temporary directory)

The config generation is now more robust, and removes entries when mod is uninstalled so that we don't lose track of those entries.

This seems like a huge change, but that is mainly due to changing how every global access works and due to moving the config system outside of portmod/repo/deps.py.

Importantly this has an integration test, and significantly improves test coverage.

Fixes #74 (closed)

Edited by Benjamin Winger

Merge request reports