]> git.ipfire.org Git - pakfire.git/commitdiff
pakfire: Add some useful output and return code to "check"
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 8 Dec 2021 16:24:27 +0000 (16:24 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 8 Dec 2021 16:24:27 +0000 (16:24 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/scripts/pakfire.in

index 4e5f6f7649b4fe714b39dca5905846064b8c304f..a9afd87848e027c939f027af5edecd1b1571a662 100644 (file)
@@ -271,7 +271,17 @@ class Cli(object):
                sys.exit(ret or 0)
 
        def _check(self, p, args):
-               p.check()
+               """
+                       Checks if this installation is properly intact
+               """
+               r = p.check()
+
+               if r:
+                       print(_("Problems have been detected. Please run 'sync' to try to fix them."))
+               else:
+                       print(_("OK"))
+
+               return r
 
        def _clean(self, p, args):
                print(_("Cleaning up everything..."))