Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected behavior when running installer a second time with the same arguments or unattend.xml #81464

Closed
JrnJacobi mannequin opened this issue Jun 14, 2019 · 7 comments
Assignees
Labels
3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes OS-windows topic-installation type-bug An unexpected behavior, bug, or error

Comments

@JrnJacobi
Copy link
Mannequin

JrnJacobi mannequin commented Jun 14, 2019

BPO 37283
Nosy @pfmoore, @tjguk, @zware, @zooba, @miss-islington
PRs
  • bpo-37283: Ensure command-line and unattend.xml setting override previously detected states in Windows installer #15759
  • [3.8] bpo-37283: Ensure command-line and unattend.xml setting override previously detected states in Windows installer (GH-15759) #15764
  • [3.7] bpo-37283: Ensure command-line and unattend.xml setting override previously detected states in Windows installer (GH-15759) #15765
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/zooba'
    closed_at = <Date 2019-09-09.13:33:51.472>
    created_at = <Date 2019-06-14.12:09:47.276>
    labels = ['type-bug', 'expert-installation', '3.9', '3.8', '3.7', 'OS-windows']
    title = 'Unexpected behavior when running installer a second time with the same arguments or unattend.xml'
    updated_at = <Date 2019-09-09.13:33:51.471>
    user = 'https://bugs.python.org/JrnJacobi'

    bugs.python.org fields:

    activity = <Date 2019-09-09.13:33:51.471>
    actor = 'steve.dower'
    assignee = 'steve.dower'
    closed = True
    closed_date = <Date 2019-09-09.13:33:51.472>
    closer = 'steve.dower'
    components = ['Installation', 'Windows']
    creation = <Date 2019-06-14.12:09:47.276>
    creator = 'J\xc3\xb6rn Jacobi'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 37283
    keywords = ['patch']
    message_count = 7.0
    messages = ['345589', '345615', '351420', '351437', '351450', '351455', '351460']
    nosy_count = 6.0
    nosy_names = ['paul.moore', 'tim.golden', 'zach.ware', 'steve.dower', 'miss-islington', 'J\xc3\xb6rn Jacobi']
    pr_nums = ['15759', '15764', '15765']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue37283'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']

    @JrnJacobi
    Copy link
    Mannequin Author

    JrnJacobi mannequin commented Jun 14, 2019

    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.

    @JrnJacobi JrnJacobi mannequin added 3.7 (EOL) end of life topic-installation type-bug An unexpected behavior, bug, or error labels Jun 14, 2019
    @SilentGhost SilentGhost mannequin added the OS-windows label Jun 14, 2019
    @zooba
    Copy link
    Member

    zooba commented Jun 14, 2019

    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.

    @zooba zooba self-assigned this Jun 14, 2019
    @zooba
    Copy link
    Member

    zooba commented Sep 9, 2019

    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.

    @zooba zooba added 3.8 only security fixes 3.9 only security fixes labels Sep 9, 2019
    @zooba
    Copy link
    Member

    zooba commented Sep 9, 2019

    New changeset 3a0ddbc by Steve Dower in branch 'master':
    bpo-37283: Ensure command-line and unattend.xml setting override previously detected states in Windows installer (GH-15759)
    3a0ddbc

    @miss-islington
    Copy link
    Contributor

    New changeset 2a4a982 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)
    2a4a982

    @miss-islington
    Copy link
    Contributor

    New changeset d3b8a6b 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)
    d3b8a6b

    @zooba
    Copy link
    Member

    zooba commented Sep 9, 2019

    This will be fixed in the next release. Thanks for the report!

    @zooba zooba closed this as completed Sep 9, 2019
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes OS-windows topic-installation type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants