pmbootstrap status: show if chroots are outdated (!1878)

Add new "pmbootstrap status" command, which does a quick health check
for the work dir. As first health check, verify that the chroots are not
too old. Replace the reminder text at the end of "pmbootstrap init" to
tell users to run "pmbootstrap status" instead of "pmbootstrap zap" once
a day before working with pmbootstrap.

Related: #1829
This commit is contained in:
Oliver Smith 2020-02-04 21:39:53 +01:00
parent 17673c5bf1
commit 1724ed4665
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
5 changed files with 110 additions and 6 deletions

View file

@ -24,6 +24,7 @@ import pmb.helpers.repo
import pmb.helpers.repo_missing
import pmb.helpers.run
import pmb.helpers.aportupgrade
import pmb.helpers.status
import pmb.install
import pmb.parse
import pmb.qemu
@ -427,3 +428,8 @@ def lint(args):
for package in packages:
pmb.helpers.lint.check(args, package)
def status(args):
if not pmb.helpers.status.print_status(args, args.details):
sys.exit(1)