mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-26 09:58:31 +01:00
Added for kernel message
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
parent
16668c9354
commit
7e3cbc36a1
2 changed files with 22 additions and 1 deletions
|
@ -1,5 +1,9 @@
|
||||||
## slpkg - ChangeLog
|
## slpkg - ChangeLog
|
||||||
|
|
||||||
|
### 5.1.6 - 18/10/2024
|
||||||
|
- Added:
|
||||||
|
* Warning message for kernel upgrade
|
||||||
|
|
||||||
### 5.1.5 - 06/10/2024
|
### 5.1.5 - 06/10/2024
|
||||||
|
|
||||||
- Updated:
|
- Updated:
|
||||||
|
|
|
@ -446,7 +446,7 @@ class Menu(Configs): # pylint: disable=[R0902]
|
||||||
raise SystemExit(0)
|
raise SystemExit(0)
|
||||||
self.usage.help_short(1)
|
self.usage.help_short(1)
|
||||||
|
|
||||||
def upgrade(self) -> None:
|
def upgrade(self) -> None: # pylint: disable=[R0912]
|
||||||
"""Upgrade the installed packages.
|
"""Upgrade the installed packages.
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
|
@ -456,6 +456,7 @@ class Menu(Configs): # pylint: disable=[R0902]
|
||||||
removed: list = []
|
removed: list = []
|
||||||
added: list = []
|
added: list = []
|
||||||
ordered: bool = True
|
ordered: bool = True
|
||||||
|
kernel_generic_current: str = self.utils.is_package_installed('kernel-generic')
|
||||||
|
|
||||||
if len(self.args) == 1:
|
if len(self.args) == 1:
|
||||||
|
|
||||||
|
@ -505,9 +506,19 @@ class Menu(Configs): # pylint: disable=[R0902]
|
||||||
else:
|
else:
|
||||||
self.usage.help_minimal(f"{self.prog_name}: invalid repository '{self.repository}'")
|
self.usage.help_minimal(f"{self.prog_name}: invalid repository '{self.repository}'")
|
||||||
|
|
||||||
|
kernel_generic_new: str = self.utils.is_package_installed('kernel-generic')
|
||||||
|
if kernel_generic_current != kernel_generic_new:
|
||||||
|
self._kernel_image_message()
|
||||||
|
|
||||||
raise SystemExit(0)
|
raise SystemExit(0)
|
||||||
self.usage.help_short(1)
|
self.usage.help_short(1)
|
||||||
|
|
||||||
|
def _kernel_image_message(self) -> None:
|
||||||
|
print(f"\n{self.bred}Warning!{self.endc} Your kernel image looks like to have been upgraded!\n"
|
||||||
|
"Please update the bootloader with the new parameters of the upgraded kernel.\n"
|
||||||
|
"See: lilo, eliloconfig or grub-mkconfig -o /boot/grub/grub.cfg,\n"
|
||||||
|
"depending on how you have your system configured.\n")
|
||||||
|
|
||||||
def repo_info(self) -> None:
|
def repo_info(self) -> None:
|
||||||
"""Print repositories information.
|
"""Print repositories information.
|
||||||
|
|
||||||
|
@ -556,6 +567,7 @@ class Menu(Configs): # pylint: disable=[R0902]
|
||||||
SystemExit: Exit code 0.
|
SystemExit: Exit code 0.
|
||||||
"""
|
"""
|
||||||
command: str = Menu.install.__name__
|
command: str = Menu.install.__name__
|
||||||
|
kernel_generic_current: str = self.utils.is_package_installed('kernel-generic')
|
||||||
|
|
||||||
if len(self.args) >= 2:
|
if len(self.args) >= 2:
|
||||||
self.data: dict = self.load_data.load(self.repository)
|
self.data: dict = self.load_data.load(self.repository)
|
||||||
|
@ -573,6 +585,11 @@ class Menu(Configs): # pylint: disable=[R0902]
|
||||||
else:
|
else:
|
||||||
install_sbo = Slackbuilds(self.repository, self.data, packages, self.flags, mode=command)
|
install_sbo = Slackbuilds(self.repository, self.data, packages, self.flags, mode=command)
|
||||||
install_sbo.execute()
|
install_sbo.execute()
|
||||||
|
|
||||||
|
kernel_generic_new: str = self.utils.is_package_installed('kernel-generic')
|
||||||
|
if kernel_generic_current != kernel_generic_new:
|
||||||
|
self._kernel_image_message()
|
||||||
|
|
||||||
raise SystemExit(0)
|
raise SystemExit(0)
|
||||||
self.usage.help_short(1)
|
self.usage.help_short(1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue