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

@ -419,10 +419,8 @@ def frontend(args):
# Do not zap any existing packages or cache_http directories
pmb.chroot.zap(args, confirm=False)
logging.info(
"WARNING: The applications in the chroots do not get updated automatically.")
logging.info("Run 'pmbootstrap zap' to delete all chroots once a day before"
" working with pmbootstrap!")
logging.info("It only takes a few seconds, and all packages are cached.")
logging.info("WARNING: The chroots and git repositories in the work dir do"
" not get updated automatically.")
logging.info("Run 'pmbootstrap status' once a day before working with"
" pmbootstrap to make sure that everything is up-to-date.")
logging.info("Done!")