diff --git a/HACKING.md b/HACKING.md index a0cc9e4cd..1b69d3ab0 100644 --- a/HACKING.md +++ b/HACKING.md @@ -115,10 +115,9 @@ directory: guest$ cd /freedombox ``` -Run the development version of FreedomBox Service (Plinth) from your source -directory in the container using the following command. This command -continuously deploys your code changes into the container providing a -quick feedback cycle during development. +Run the development version of FreedomBox Service in the container using the +following command. This command continuously deploys your code changes into the +container providing a quick feedback cycle during development. ```bash guest$ freedombox-develop diff --git a/container b/container index c02e6b7b2..14ac23f60 100755 --- a/container +++ b/container @@ -164,7 +164,7 @@ sudo apt-mark unhold freedombox sudo DEBIAN_FRONTEND=noninteractive apt-get install --yes ncurses-term \ sshpass bash-completion -echo 'alias freedombox-develop="sudo -u plinth /freedombox/run --develop"' \ +echo 'alias freedombox-develop="cd /freedombox; sudo -u plinth /freedombox/run --develop"' \ >> /home/fbx/.bashrc # Make some pytest related files and directories writable to the fbx user @@ -812,8 +812,16 @@ def _destroy(distribution): connection_name = f'fbx-{distribution}-shared' logger.info('Removing Network Manager connection %s', connection_name) - subprocess.run(['sudo', 'nmcli', 'connection', 'delete', connection_name], - stdout=subprocess.DEVNULL) + result = subprocess.run( + ['sudo', 'nmcli', 'connection', 'delete', connection_name], + capture_output=True) + if result.returncode not in (0, 10): + # nmcli failed and not due to 'Connection, device, or access point does + # not exist.' See + # https://developer-old.gnome.org/NetworkManager/stable/nmcli.html + logger.error('nmcli returned code %d', result.returncode) + logger.error('Error message:\n%s', result.stderr.decode()) + logger.error('Output:\n%s', result.stdout.decode()) logger.info('Keeping downloaded image: %s', _get_compressed_image_path(distribution))