Fixed for customs repo

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2024-07-22 18:19:21 +03:00
parent 6e9f0d8773
commit 0a9c900bb4
2 changed files with 12 additions and 7 deletions

View file

@ -1,11 +1,14 @@
## slpkg - ChangeLog
### 5.1.1 - 11/06/2024
### 5.1.1 - 22/07/2024
- Added:
* Added an 'installed' tag for installed packages in the search command
* Added option --fetch to see the fastest and the slower mirror
- Fixed:
* Fixed to create custom repositories (Thanks to mac-a-r0ni)
### 5.1.0 - 06/06/2024
- Added:

View file

@ -420,18 +420,20 @@ class Repositories: # pylint: disable=[R0902]
for item in items_to_remove:
diff_repos.remove(item)
diff_repos = [name.upper() for name in diff_repos]
if diff_repos:
for repo, data in repos_config.items():
if repo in diff_repos:
mirror_packages: str = data.get('mirror', '')
mirror_packages: str = data.get('MIRROR', '')
mirror_changelog: str = mirror_packages
if data.get('changelog'):
mirror_changelog: str = data.get('changelog', '')
if data.get('CHANGELOG'):
mirror_changelog: str = data.get('CHANGELOG', '')
values = {
'enable': data.get('enable', False),
'path': Path(repositories_path, str(repo)),
'enable': data.get('ENABLE'),
'path': Path(repositories_path, str(repo.lower())),
'mirror_packages': mirror_packages,
'mirror_changelog': mirror_changelog,
'packages_txt': packages_txt,
@ -439,4 +441,4 @@ class Repositories: # pylint: disable=[R0902]
'changelog_txt': changelog_txt,
'repo_tag': data.get('tag', '')
}
repositories[str(repo)] = values
repositories[str(repo.lower())] = values