pmb.config.pmaports: replace aports split msg
When running a pmbootstrap command and the pmaports dir does not exist, it would print the following error: WARNING: Can't create log file in '/home/user/.local/var/pmbootstrap', path does not exist! [02:14:37] ERROR: We have split the aports repository from the pmbootstrap repository (#383). Please run 'pmbootstrap init' again to clone it. [02:14:37] See also: <https://postmarketos.org/troubleshooting> Run 'pmbootstrap log' for details. Alternatively you can use '--details-to-stdout' to get more output, e.g. 'pmbootstrap --details-to-stdout init'. This is long obsolete. By now the reason for the missing pmaports dir is not that we had moved it from pmbootstrap.git to a separate git repository, it's most likely that the user did not run 'pmbootstrap init'. Adjust the message, and quit without link to troubleshooting etc: [02:15:28] ERROR: pmaports dir not found: /home/user/.local/var/pmbootstrap/cache_git/pmaports [02:15:28] Did you run 'pmbootstrap init'? Reviewed-by: Luca Weiss <luca@z3ntu.xyz> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230408002810.2006-1-ollieparanoid@postmarketos.org%3E
This commit is contained in:
parent
10fd860837
commit
46b708295a
|
@ -3,6 +3,7 @@
|
|||
import configparser
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
|
||||
import pmb.config
|
||||
import pmb.helpers.git
|
||||
|
@ -89,9 +90,9 @@ def read_config(args):
|
|||
|
||||
# Migration message
|
||||
if not os.path.exists(args.aports):
|
||||
raise RuntimeError("We have split the aports repository from the"
|
||||
" pmbootstrap repository (#383). Please run"
|
||||
" 'pmbootstrap init' again to clone it.")
|
||||
logging.error(f"ERROR: pmaports dir not found: {args.aports}")
|
||||
logging.error("Did you run 'pmbootstrap init'?")
|
||||
sys.exit(1)
|
||||
|
||||
# Require the config
|
||||
path_cfg = args.aports + "/pmaports.cfg"
|
||||
|
|
Loading…
Reference in New Issue