mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 10:25:36 -04:00
[packages] Feature: skip if no internet.
Update documentation, add a new key *skip_if_no_internet* to support systems that **recommend** having an internet connection (but don't require it), and which also use the packages module. This prevents a long delay while the package manager tries to access the internet and times out (repeatedly). Existing configurations are unchanged.
This commit is contained in:
parent
7b145c2a36
commit
150007c138
2 changed files with 19 additions and 3 deletions
|
@ -426,6 +426,11 @@ def run():
|
|||
else:
|
||||
return "Bad backend", "backend=\"{}\"".format(backend)
|
||||
|
||||
skip_this = libcalamares.job.configuration.get("skip_if_no_internet", false)
|
||||
if skip_this and not libcalamares.globalstorage.value("hasInternet"):
|
||||
cDebug() << "WARNING: packages installation has been skipped: no internet";
|
||||
return None
|
||||
|
||||
update_db = libcalamares.job.configuration.get("update_db", False)
|
||||
if update_db and libcalamares.globalstorage.value("hasInternet"):
|
||||
pkgman.update_db()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue