This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Unexpected behavior when running installer a second time with the same arguments or unattend.xml
Type: behavior Stage: resolved
Components: Installation, Windows Versions: Python 3.9, Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: steve.dower Nosy List: Jörn Jacobi, miss-islington, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2019-06-14 12:09 by Jörn Jacobi, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 15759 merged steve.dower, 2019-09-09 11:24
PR 15764 merged miss-islington, 2019-09-09 12:15
PR 15765 merged miss-islington, 2019-09-09 12:15
Messages (7)
msg345589 - (view) Author: Jörn Jacobi (Jörn Jacobi) Date: 2019-06-14 12:09
When executing the installer with arguments or using the unattend.xml to run it without UI as documented in https://python.readthedocs.io/en/stable/using/windows.html#installing-without-ui the installer ignores the arguments or unattend.xml when it's executed again.

The second time, the installer (running i modify mode) uses the default values (hereby removing the Prepenpath if set the first time)

(testet with version 3.6.6-amd64 to 3.7.3-amd64 of the executable installer)

To recreate, run the following : 

step 1 :
python-3.6.6-amd64.exe /passive InstallAllUsers=1 PrependPath=1 Include_doc=0 Include_dev=0 Include_tcltk=0 Include_test=0 SimpleInstall=1 

now python is install as expected.

step 2 : 
python-3.6.6-amd64.exe /passive InstallAllUsers=1 PrependPath=1 Include_doc=0 Include_dev=0 Include_tcltk=0 Include_test=0 SimpleInstall=1

even though the options are exactly the same, the installer now removes python from path and installs tcltk, documentation, test and dev.

step 3 : 
python-3.6.6-amd64.exe /passive InstallAllUsers=1 PrependPath=1 Include_doc=0 Include_dev=0 Include_tcltk=0 Include_test=0 SimpleInstall=1

now the installer only makes a quick check, what i would have expected in step 2, but hare only the default values are used.
msg345615 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-06-14 17:10
Hmm... interesting.

Thanks for the heads-up, I think I know what this may be (there's a conditional planning stage in the bootstrapper that is probably being skipped on Modify). I'll take a look when I get a chance.
msg351420 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-09-09 10:45
Okay, this is definitely an ordering issue in Tools/msi/bundle/bootstrap/PythonBootstrapApplication.cpp

Fixing most of the options is easy - just a case of moving LoadOptionalFeatureStates() a few lines up - but Install_launcher is set much later. I should be able to fix both though.
msg351437 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-09-09 12:15
New changeset 3a0ddbcdfcbc0f4372905fabf81e093f1b043e99 by Steve Dower in branch 'master':
bpo-37283: Ensure command-line and unattend.xml setting override previously detected states in Windows installer (GH-15759)
https://github.com/python/cpython/commit/3a0ddbcdfcbc0f4372905fabf81e093f1b043e99
msg351450 - (view) Author: miss-islington (miss-islington) Date: 2019-09-09 13:02
New changeset 2a4a982cbccf66dd8d29439dbd232c79fe3ec44e by Miss Islington (bot) in branch '3.8':
bpo-37283: Ensure command-line and unattend.xml setting override previously detected states in Windows installer (GH-15759)
https://github.com/python/cpython/commit/2a4a982cbccf66dd8d29439dbd232c79fe3ec44e
msg351455 - (view) Author: miss-islington (miss-islington) Date: 2019-09-09 13:15
New changeset d3b8a6bf7c5f7574a3256468c4d0a755ba7a9048 by Miss Islington (bot) in branch '3.7':
bpo-37283: Ensure command-line and unattend.xml setting override previously detected states in Windows installer (GH-15759)
https://github.com/python/cpython/commit/d3b8a6bf7c5f7574a3256468c4d0a755ba7a9048
msg351460 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-09-09 13:33
This will be fixed in the next release. Thanks for the report!
History
Date User Action Args
2022-04-11 14:59:16adminsetgithub: 81464
2019-09-09 13:33:51steve.dowersetstatus: open -> closed
resolution: fixed
messages: + msg351460

stage: patch review -> resolved
2019-09-09 13:15:30miss-islingtonsetmessages: + msg351455
2019-09-09 13:02:47miss-islingtonsetnosy: + miss-islington
messages: + msg351450
2019-09-09 12:15:25miss-islingtonsetpull_requests: + pull_request15418
2019-09-09 12:15:18miss-islingtonsetpull_requests: + pull_request15417
2019-09-09 12:15:09steve.dowersetmessages: + msg351437
2019-09-09 11:24:54steve.dowersetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request15412
2019-09-09 10:45:37steve.dowersetstage: needs patch
messages: + msg351420
versions: + Python 3.8, Python 3.9, - Python 3.6
2019-06-14 17:10:53steve.dowersetassignee: steve.dower
messages: + msg345615
2019-06-14 12:49:21SilentGhostsetnosy: + paul.moore, tim.golden, zach.ware, steve.dower
components: + Windows
2019-06-14 12:09:47Jörn Jacobicreate