diff --git a/configs/repositories.toml b/configs/repositories.toml index f9a7bdd3..f25b8e08 100644 --- a/configs/repositories.toml +++ b/configs/repositories.toml @@ -36,12 +36,14 @@ REPOSITORY = "sbo" [NEW_PACKAGES] # Configure the repositories that you want new packages to be added -# when upgrading installed packages. Example ["slack", "gnome"]. +# when upgrading installed packages. Only useful for repositories that +# are fully installed on the system. Example ["slack", "gnome"]. REPOSITORIES = [] [REMOVE_PACKAGES] # Configure the repositories that you want to remove installed packages -# that no longer exist in the repository. Example ["slack", "gnome"]. +# that no longer exist in the repository. Only useful for repositories +# that are fully installed on the system. Example ["slack", "gnome"]. REPOSITORIES = [] [SBO] diff --git a/slpkg/repositories.py b/slpkg/repositories.py index 0c357ef9..2ba157b1 100644 --- a/slpkg/repositories.py +++ b/slpkg/repositories.py @@ -31,7 +31,7 @@ class Repositories: # pylint: disable=[R0902] repos_config = {} repositories = {} - repos_toml = {} # type: ignore[var-annotated] + repos_toml = {} data_json: str = 'data.json' repos_information: Path = Path(repositories_path, 'repos_information.json') @@ -444,7 +444,9 @@ class Repositories: # pylint: disable=[R0902] defaults_repos = list(repositories.keys()) diff_repos = list(set(all_repos) - set(defaults_repos)) - diff_repos.remove('default') + items_to_remove = ('default', 'new_packages', 'remove_packages') + for item in items_to_remove: + diff_repos.remove(item) if diff_repos: for repo, data in repos_config.items():