Merge pull request #1351 from mwhudson/ignore-running

Pass ignore-running: true when refreshing ourself
This commit is contained in:
Michael Hudson-Doyle 2022-07-15 12:41:18 +12:00 committed by GitHub
commit d9ad8134e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View File

@ -11,8 +11,15 @@ apps:
subiquity:
command: usr/bin/subiquity-cmd
environment:
# Save original values of environment variables, we want to restore them
# for the debug shell (LP: #1975629) and restart (LP: #1978139)
PYTHONPATH_ORIG: $PYTHONPATH
PATH_ORIG: $PATH
PYTHONIOENCODING_ORIG: $PYTHONIOENCODING
PYTHONIOENCODING: utf-8
SUBIQUITY_ROOT_ORIG: $SUBIQUITY_ROOT
SUBIQUITY_ROOT: $SNAP
PYTHON_ORIG: $PYTHON
PYTHON: $SNAP/usr/bin/python3.8
probert:
command: bin/probert

View File

@ -203,7 +203,7 @@ class SubiquityClient(TuiApplication):
cmdline.extend(['--server-pid', self.opts.server_pid])
log.debug("restarting %r", cmdline)
os.execvp(cmdline[0], cmdline)
os.execvpe(cmdline[0], cmdline, orig_environ(os.environ))
def resp_hook(self, response):
headers = response.headers

View File

@ -215,7 +215,7 @@ class RefreshController(SubiquityController):
async def start_update(self, context):
change = await self.app.snapd.post(
'v2/snaps/{}'.format(self.snap_name),
{'action': 'refresh'})
{'action': 'refresh', 'ignore-running': True})
context.description = "change id: {}".format(change)
return change