mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-16 07:47:35 +01:00
Added slackpkg changelog update
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
parent
7d44a85e7b
commit
a0545bb9c4
2 changed files with 18 additions and 1 deletions
|
@ -1,9 +1,10 @@
|
|||
## slpkg - ChangeLog
|
||||
|
||||
### 5.0.9 - 11/05/2024
|
||||
### 5.0.9 - 12/05/2024
|
||||
|
||||
- Added:
|
||||
* Inform message for invalid package version with the upgrade command
|
||||
* Config to update the slackpkg ChangeLog.txt file
|
||||
|
||||
### 5.0.8 - 10/05/2024
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
|
||||
import re
|
||||
import shutil
|
||||
import filecmp
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
|
@ -110,6 +112,17 @@ class UpdateRepositories(Configs): # pylint: disable=[R0902]
|
|||
"""
|
||||
print(f"Syncing with the repository '{self.green}{repo}{self.endc}', please wait...\n")
|
||||
|
||||
def slackpkg_changelog_update(self) -> None:
|
||||
""" Updates the slackpkg ChangeLog.txt file.
|
||||
"""
|
||||
if self.slackpkg_changelog:
|
||||
slackpkg_changelog_path: Path = Path('/var/lib/slackpkg')
|
||||
slackpkg_changelog_file: Path = Path(slackpkg_changelog_path, self.repos.changelog_txt)
|
||||
slpkg_changelog_file: Path = Path(self.repos.slack_repo_path, self.repos.changelog_txt)
|
||||
if slackpkg_changelog_path.is_dir():
|
||||
if not filecmp.cmp(slackpkg_changelog_file, slpkg_changelog_file):
|
||||
shutil.copy(slpkg_changelog_file, slackpkg_changelog_file)
|
||||
|
||||
def update_binary_repos(self, repo: str) -> None:
|
||||
"""Updates the binary repositories.
|
||||
|
||||
|
@ -142,6 +155,9 @@ class UpdateRepositories(Configs): # pylint: disable=[R0902]
|
|||
|
||||
self.data.install_binary_data(repo)
|
||||
|
||||
if repo == self.repos.slack_repo_name:
|
||||
self.slackpkg_changelog_update()
|
||||
|
||||
def update_slackbuild_repos(self, repo: str) -> None:
|
||||
"""Updates the slackbuild repositories.
|
||||
|
||||
|
|
Loading…
Reference in a new issue