## METABROWSER_CACHE_DIR must name an absolute path; nothing is created otherwise.
# METABROWSER_CACHE_DIR= metab <ORIGIN-A> --no-serve
exit: 1
--- stdout ---
--- stderr ---
Error: METABROWSER_CACHE_DIR must be a nonempty absolute path without '..' components.
# METABROWSER_CACHE_DIR=relative/home metab <ORIGIN-A> --no-serve
exit: 1
--- stdout ---
--- stderr ---
Error: METABROWSER_CACHE_DIR must be a nonempty absolute path without '..' components.
## A is acquired into a private home.
# metab <ORIGIN-A> --no-serve
exit: 0
--- stdout ---
acquired: <ORIGIN-A>
slug: <SLUG-A>
store: <STORE-A>
revision: 8f05aafe23bbeade03ef581868a59e3c944ac5c4
--- stderr ---
cloning <ORIGIN-A> into <HOME>
cloned <ORIGIN-A> in 0.0 s
## A home other users can read refuses both a cache hit and a new acquisition, says how to fix it, and is not changed.
# metab <ORIGIN-A> --no-serve
exit: 1
--- stdout ---
--- stderr ---
Error: The Metabrowser storage directory is accessible to other users (mode 0755). Run chmod 700 on it, or set the applicable override (METABROWSER_CACHE_DIR or METABROWSER_CONFIG_DIR) to a private directory you own.
# metab <ORIGIN-B> --no-serve
exit: 1
--- stdout ---
--- stderr ---
Error: The Metabrowser storage directory is accessible to other users (mode 0755). Run chmod 700 on it, or set the applicable override (METABROWSER_CACHE_DIR or METABROWSER_CONFIG_DIR) to a private directory you own.
## After chmod 700, A is reused and B is acquired.
# metab <ORIGIN-A> --no-serve
exit: 0
--- stdout ---
acquired: <ORIGIN-A>
slug: <SLUG-A>
store: <STORE-A>
revision: 8f05aafe23bbeade03ef581868a59e3c944ac5c4
--- stderr ---
using the clone of <ORIGIN-A> cached in <HOME>, fetched less than a minute ago
# metab <ORIGIN-B> --no-serve
exit: 0
--- stdout ---
acquired: <ORIGIN-B>
slug: <SLUG-B>
store: <STORE-B>
revision: 8f05aafe23bbeade03ef581868a59e3c944ac5c4
--- stderr ---
cloning <ORIGIN-B> into <HOME>
cloned <ORIGIN-B> in 0.0 s
## A broken config names the file and how to recreate it without changing the cache.
# metab <ORIGIN-A> --no-serve
exit: 1
--- stdout ---
--- stderr ---
Error: Could not read configuration at <CONFIG>/config.yml: config.yml is not portable YAML. Move this config file aside or remove it, then restart Metabrowser to create a fresh config. Cached repositories will be kept.
## A full configuration disk names the file and leaves the cached repository intact.
# metab <ORIGIN-A> --no-serve
exit: 1
--- stdout ---
--- stderr ---
Error: Could not create configuration at <CONFIG>/config.yml: No space left on device. Check that the configuration directory is writable and has free space, then try again.
## The next start recreates the config and reuses the cached repository.
# metab <ORIGIN-A> --no-serve
exit: 0
--- stdout ---
acquired: <ORIGIN-A>
slug: <SLUG-A>
store: <STORE-A>
revision: 8f05aafe23bbeade03ef581868a59e3c944ac5c4
--- stderr ---
using the clone of <ORIGIN-A> cached in <HOME>, fetched less than a minute ago
## A valid config from a newer format instead asks for an upgrade and stays unchanged.
# metab <ORIGIN-A> --no-serve
exit: 1
--- stdout ---
--- stderr ---
Error: This Metabrowser configuration directory uses format f02, and this release reads formats up to f01. Upgrade Metabrowser, or set METABROWSER_CONFIG_DIR to a different directory.
## A home written by a newer release is refused before anything is written.
# metab <ORIGIN-A> --no-serve
exit: 1
--- stdout ---
--- stderr ---
Error: This Metabrowser cache directory uses format f02, and this release reads formats up to f01. Upgrade Metabrowser, or set METABROWSER_CACHE_DIR to a different directory.
## Another METABROWSER_CACHE_DIR, as the message suggests, acquires independently.
# metab <ORIGIN-A> --no-serve
exit: 0
--- stdout ---
acquired: <ORIGIN-A>
slug: <SLUG-A>
store: <STORE-A>
revision: 8f05aafe23bbeade03ef581868a59e3c944ac5c4
--- stderr ---
cloning <ORIGIN-A> into <OTHER-HOME>
cloned <ORIGIN-A> in 0.0 s
