From a16d7900c2aee3f3120e1d21353176de55b6976b Mon Sep 17 00:00:00 2001 From: Timon Date: Sat, 15 May 2021 01:09:20 +0200 Subject: [PATCH 1/3] Only do package update, no system upgrade The guides already say to to an upgrade before even running this script and the way this works right now it just hangs for a long time without any feedback for sometimes 10-20 minutes. This is I think not a very good UX. See this issue on more reasoning: https://github.com/adafruit/Raspberry-Pi-Installer-Scripts/issues/174 The default nature of upgrading all the system packages is I think a bit too many changes than one would expect from installing a python package. --- raspi-blinka.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/raspi-blinka.py b/raspi-blinka.py index a73dbdf..9d5c812 100644 --- a/raspi-blinka.py +++ b/raspi-blinka.py @@ -38,9 +38,6 @@ def sys_update(): print("Updating System Packages") if not shell.run_command("sudo apt-get update"): shell.bail("Apt failed to update indexes!") - print("Upgrading packages...") - if not shell.run_command("sudo apt-get -y upgrade"): - shell.bail("Apt failed to install software!") def set_raspiconfig(): """ From 7c805d79974212f1209262dc1004daba7854740e Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Fri, 21 May 2021 14:15:41 -0700 Subject: [PATCH 2/3] Add prompt to package upgrade --- raspi-blinka.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/raspi-blinka.py b/raspi-blinka.py index 9d5c812..ab8a002 100644 --- a/raspi-blinka.py +++ b/raspi-blinka.py @@ -34,10 +34,14 @@ def check_blinka_python_version(): if get_python3_version() < blinka_minimum_python_version: shell.bail("Blinka requires a minimum of Python version {} to install. Please update your OS!".format(blinka_minimum_python_version)) -def sys_update(): +def sys_update(): print("Updating System Packages") if not shell.run_command("sudo apt-get update"): shell.bail("Apt failed to update indexes!") + if shell.prompt("Would you like to upgrade system packages now?", default="y"): + print("Upgrading packages...") + if not shell.run_command("sudo apt-get -y upgrade"): + shell.bail("Apt failed to install software!") def set_raspiconfig(): """ From cdface8a4c076610b3432254fdec4b8d1f6369eb Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Fri, 21 May 2021 14:16:15 -0700 Subject: [PATCH 3/3] Remove extra spaces --- raspi-blinka.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raspi-blinka.py b/raspi-blinka.py index ab8a002..87c22bc 100644 --- a/raspi-blinka.py +++ b/raspi-blinka.py @@ -34,7 +34,7 @@ def check_blinka_python_version(): if get_python3_version() < blinka_minimum_python_version: shell.bail("Blinka requires a minimum of Python version {} to install. Please update your OS!".format(blinka_minimum_python_version)) -def sys_update(): +def sys_update(): print("Updating System Packages") if not shell.run_command("sudo apt-get update"): shell.bail("Apt failed to update indexes!")