cmds.pkg.CmdVerify: Add command
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m24s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m43s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 4m48s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m38s
CI / Packaging test (push) Successful in 0s
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m24s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m43s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 4m48s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m38s
CI / Packaging test (push) Successful in 0s
Add the "packages verify" command: it runs Distro.verify() with the app's package filter and prints one line per flagged file. Signed-off-by: Jan Lindemann <jan@janware.com> Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.2.0
This commit is contained in:
parent
cae983479c
commit
8106d4a7b0
1 changed files with 173 additions and 1 deletions
29
src/python/jw/pkg/cmds/pkg/CmdVerify.py
Normal file
29
src/python/jw/pkg/cmds/pkg/CmdVerify.py
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, override
|
||||
|
||||
from .Cmd import Cmd, Parent
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from argparse import ArgumentParser, Namespace
|
||||
|
||||
class CmdVerify(Cmd): # export
|
||||
|
||||
def __init__(self, parent: Parent) -> None:
|
||||
super().__init__(
|
||||
parent,
|
||||
'verify',
|
||||
help = (
|
||||
'Verify the integrity of installed packages: report files'
|
||||
' modified or deleted outside of the package manager'
|
||||
)
|
||||
)
|
||||
|
||||
@override
|
||||
def add_arguments(self, parser: ArgumentParser) -> None:
|
||||
super().add_arguments(parser)
|
||||
|
||||
@override
|
||||
async def _run(self, args: Namespace) -> None:
|
||||
for file in await self.distro.verify():
|
||||
print(file)
|
||||
Loading…
Reference in a new issue