pmbootstrap-meow/pmb/helpers
Oliver Smith 7269d05b20
pmb.helpers.repo.download: proper error for 404 (MR 2462)
Flush the progress bar displayed by the function before logging a
warning message for 404 not found responses from the server. Without
flushing, this message gets lost.

In addition to the warning, display a NOTE and ERROR at the end to
explain what went wrong:

  [20:16:50] Update package index for x86_64 (4 file(s))
  [20:16:51] WARNING: file not found: http://mirror.postmarketos.org/postmarketos_get_404_test/edge/main/x86_64/APKINDEX.tar.gz
  [20:16:51] NOTE: check the [mirrors] section in 'pmbootstrap config'
  [20:16:51] ERROR: getting APKINDEX from binary package mirror failed!

Without handling this properly, pmbootstrap would fail slightly later
with a much less useful error:

  [15:14:28] ERROR: expected str, bytes or os.PathLike object, not NoneType

Fixes: pmbootstrap issue 2424
2024-10-27 20:52:13 +01:00
..
__init__.py Bump copyright to 2023 2023-01-22 19:18:06 +01:00
apk.py chroot: always run apk static v2 (MR 2423) 2024-10-08 16:54:29 +02:00
aportupgrade.py Run ruff check --fix (MR 2357) 2024-07-16 00:26:35 +02:00
args.py pmb.helpers.args: Remove please_i_really_need_args() (MR 2442) 2024-10-27 17:49:15 +01:00
cli.py Auto-format codebase with ruff (MR 2325) 2024-06-23 15:40:13 +02:00
devices.py Run ruff check --fix (MR 2357) 2024-07-16 00:26:35 +02:00
exceptions.py Auto-format codebase with ruff (MR 2325) 2024-06-23 15:40:13 +02:00
file.py Use simplified Python 3.8 syntax (MR 2327) 2024-06-23 19:13:52 +02:00
frontend.py pmb.flasher: Remove use of args (MR 2441) 2024-10-22 15:12:40 +02:00
git.py helpers: make get_topdir return Path (MR 2413) 2024-10-17 18:53:44 +02:00
http.py pmb.helpers.repo.download: proper error for 404 (MR 2462) 2024-10-27 20:52:13 +01:00
lint.py lint: generate options from kconfigcheck.toml (MR 2412) 2024-10-13 18:24:51 +02:00
logging.py pmb.helpers.logging: Annotate types for loglevels (MR 2431) 2024-10-15 10:59:01 +02:00
mount.py pmb.helpers.mount: Add more type hints (MR 2434) 2024-10-27 00:38:16 +02:00
other.py migrate_work_folder: print suffix in migration msg (MR 2460) 2024-10-27 20:47:06 +01:00
package.py pmb.parse.apkindex: Introduce proper typing (MR 2425) 2024-10-13 20:12:34 +02:00
pkgrel_bump.py pmb.helpers.pkgrel_bump: Add type hints and fix auto_apkindex_package (MR 2438) 2024-10-21 21:05:17 +02:00
pmaports.py pmb.helpers.pmaports: Annotate return type for get_list() as list (MR 2431) 2024-10-15 10:59:06 +02:00
repo.py pmb.helpers.repo.download: proper error for 404 (MR 2462) 2024-10-27 20:52:13 +01:00
repo_missing.py pmb.parse.apkindex: Introduce proper typing (MR 2425) 2024-10-13 20:12:34 +02:00
run.py Run ruff check --fix (MR 2357) 2024-07-16 00:26:35 +02:00
run_core.py Run ruff format (MR 2357) 2024-07-16 00:26:35 +02:00
status.py Auto-format codebase with ruff (MR 2325) 2024-06-23 15:40:13 +02:00
toml.py helpers: toml: fix mypy on import (MR 2344) 2024-07-08 16:01:13 +02:00
ui.py pmb.helpers.ui.check_option: fix for UI = none (MR 2348) 2024-07-05 00:48:52 +02:00