Dixed for locals

This commit is contained in:
Dimitris Zlatanidis 2024-04-04 12:27:02 +03:00
parent efa2d40bb9
commit b529a4491f
4 changed files with 10 additions and 5 deletions

View file

@ -10,6 +10,7 @@
- Bugfixes:
* Fixed compare invalid packages version
* Fixed to work with locals repositories
### 5.0.3 - 01/04/2024
- Updated:

View file

@ -1,18 +1,21 @@
# This is the general repositories configuration file of slpkg:
# /etc/slpkg/repositories.toml
# Updated: 27/03/2024, Version: 5.0.0
# Updated: 04/04/2024, Version: 5.0.4
# Set 'true' to the variable {NAME}_REPO to enable a repository.
# If you are going to use a local repository, set the repository:
# as the example bellow:
# ALIEN_REPO_LOCAL = ["file:///path/to/alien/repository/" ,"15.0/", "x86_64/"]
# ALIEN_REPO_LOCAL = ["file:///path/to/alien/repository/",
# "15.0/", "x86_64/"]
# A binary local repository will must contain the files:
# ChangeLog.txt, PACKAGES.TXT and CHECKSUMS.md5
# A SlackBuilds repository will must contain the files:
# SLACKBUILDS.TXT and ChangeLog.txt
# After the mirror changed, you should update the database, run:
# slpkg update
# Note: Do not delete the mirror, it is using to synchronize
# with the local repo.
# DO NOT CHANGE THE PATTERN OF THE MIRRORS, CHANGE ONLY WHAT YOU WANT.
# For alien and Slackware -current users should be:

View file

@ -63,7 +63,7 @@ class CheckUpdates(Configs):
self.repos.repositories[repo]['changelog_txt'])
repo_chg_txt: str = (f"{self.repos.repositories[repo]['mirror'][0]}"
f"{self.repos.repositories[repo]['changelog_txt']}")
repo_data_file: Path = Path(self.repos.repositories_path, repo, self.repos.data_json)
repo_data_file: Path = Path(self.repos.repositories[repo]['path'], self.repos.data_json)
if not repo_data_file.is_file():
self.compare[repo]: dict = True

View file

@ -25,10 +25,11 @@ class LoadData(Configs):
if repository == '*':
for repo, item in self.repos.repositories.items():
if item['enable']: # Check if the repository is enabled
json_data_file: Path = Path(f'{self.repos.repositories_path}/{repo}', self.repos.data_json)
json_data_file: Path = Path(self.repos.repositories[repo]['path'], self.repos.data_json)
data[repo] = self.read_data_file(json_data_file)
else:
json_data_file: Path = Path(f'{self.repos.repositories_path}/{repository}', self.repos.data_json)
json_data_file: Path = Path(self.repos.repositories[repository]['path'], self.repos.data_json)
data: dict = self.read_data_file(json_data_file)
blacklist: tuple = self.black.packages()