Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
snapcraft: Fix *_ORIG variables (#842)
Ensure subiquity-server and ubuntu-desktop-bootstrap apps have PATH_ORIG, PYTHON_ORIG, and PYTHONPATH_ORIG environment variables. Lacking these causes usage of subiquity's system_scripts to fail to find the right python _outside_ of the snap. This is currently causing installs to fail on daily desktop-builds. Also remove LD_LIBRARY_PATH_ORIG since it's not needed anymore. The rational for removing LD_LIBRARY_PATH is mostly that we don't need it. However, after injecting a new snap to test these changes I found subiquity struggling to replace LD_LIBRARY_PATH_ORIG because LD_LIBRARY_PATH wasn't set. LD_LIBRARY_PATH_ORIG is empty, which means the control flow in the environment cleaner function executes [this line](https://github.com/canonical/subiquity/blob/a57ed5a5e3ba1fd2212fae3c2f3e84cc8459a158/subiquitycore/utils.py#L73) which cause a `KeyError` because LD_LIBRARY_PATH is unset (trying to delete a non-existent key). Strangely this error isn't present in an unmodified ISO. This leads me to believe that the way I'm building the snap is slightly different than the launchpad setup. (I can download the snap and inject it without encountering the issue.) Regardless, we can remove LD_LIBRARY_PATH_ORIG because we're [always going to remove it from the cleaned environment anyways](https://github.com/canonical/subiquity/blob/a57ed5a5e3ba1fd2212fae3c2f3e84cc8459a158/subiquitycore/utils.py#L75). LP: [#2082851](https://pad.lv/2082851)
- Loading branch information