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

Add a ProviderKey to the installer bundle #73032

Closed
zooba opened this issue Nov 30, 2016 · 4 comments
Closed

Add a ProviderKey to the installer bundle #73032

zooba opened this issue Nov 30, 2016 · 4 comments
Assignees
Labels
3.7 (EOL) end of life OS-windows type-bug An unexpected behavior, bug, or error

Comments

@zooba
Copy link
Member

zooba commented Nov 30, 2016

BPO 28846
Nosy @pfmoore, @tjguk, @ned-deily, @zware, @zooba

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 2016-12-03.20:15:04.218>
created_at = <Date 2016-11-30.23:57:38.494>
labels = ['type-bug', '3.7', 'OS-windows']
title = 'Add a ProviderKey to the installer bundle'
updated_at = <Date 2016-12-03.20:15:04.217>
user = 'https://github.com/zooba'

bugs.python.org fields:

activity = <Date 2016-12-03.20:15:04.217>
actor = 'steve.dower'
assignee = 'steve.dower'
closed = True
closed_date = <Date 2016-12-03.20:15:04.218>
closer = 'steve.dower'
components = ['Windows']
creation = <Date 2016-11-30.23:57:38.494>
creator = 'steve.dower'
dependencies = []
files = []
hgrepos = []
issue_num = 28846
keywords = []
message_count = 4.0
messages = ['282118', '282127', '282302', '282303']
nosy_count = 6.0
nosy_names = ['paul.moore', 'tim.golden', 'ned.deily', 'python-dev', 'zach.ware', 'steve.dower']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue28846'
versions = ['Python 3.5', 'Python 3.6', 'Python 3.7']

@zooba
Copy link
Member Author

zooba commented Nov 30, 2016

Currently the installer bundles for 3.5 and later have an automatically generated dependency provider key. This makes it difficult for other installers to correctly depend on the bundle.

For example, Visual Studio 2017 has an option to install CPython 3.5, but it cannot accurately determine when it is already installed, which may lead to Python being uninstalled unexpectedly. This is the purpose of the provider key - to provide a reliable key by which to reference the bundle.

For 3.5.2 and earlier, the key is a GUID that changes each release, but really the key should be stable for each version that cannot be installed side-by-side.

The change is to Tools/msi/bundle/bundle.wxs and adds the last attribute to this element:

<Bundle Name="!(loc.FullProductName)"
UpgradeCode="$(var.CoreUpgradeCode)"
Version="$(var.Version)"
IconSourceFile="bundle.ico"
Manufacturer="!(loc.Manufacturer)"
AboutUrl="http://www.python.org/"
DisableModify="button"
Compressed="no"
dep:ProviderKey="CPython-$(var.MajorVersionNumber).$(var.MinorVersionNumber)$(var.PyArchExt)$(var.PyTestExt)">

This will produce keys like "CPython-3.5", "CPython-3.5-32", "CPython-3.5-test" and "CPython-3.5-32-test" (the "-test" suffixed installers are never released, but may be produced by Tools/msi/build.bat).

I haven't tested it yet, but I believe this change will also fix a minor issue where the web and non-web installers conflict, even when the versions match.

Since it is important this metadata be consistent throughout the lifetime of a release, I'd like to get the change into Python 3.6.0rc1 after I've spent the time testing it. Ned - your thoughts?

@zooba zooba added the 3.7 (EOL) end of life label Nov 30, 2016
@zooba zooba self-assigned this Nov 30, 2016
@zooba zooba added OS-windows type-bug An unexpected behavior, bug, or error labels Nov 30, 2016
@ned-deily
Copy link
Member

Sounds good to me.

@python-dev
Copy link
Mannequin

python-dev mannequin commented Dec 3, 2016

New changeset 68530c0a1487 by Steve Dower in branch '3.5':
Issue bpo-28846: Various installer fixes
https://hg.python.org/cpython/rev/68530c0a1487

New changeset 5171bd86a36f by Steve Dower in branch '3.6':
Issue bpo-28846: Various installer fixes
https://hg.python.org/cpython/rev/5171bd86a36f

New changeset 014f52fe1da1 by Steve Dower in branch 'default':
Issue bpo-28846: Various installer fixes
https://hg.python.org/cpython/rev/014f52fe1da1

@zooba
Copy link
Member Author

zooba commented Dec 3, 2016

This bloated into a couple of extra build/installer fixes, including *finally* fixing the sys._mercurial bug (I hope). I can also now merge fairly cleanly between 3.5 and 3.6 again, so I'm happy for a while :)

@zooba zooba closed this as completed Dec 3, 2016
@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 OS-windows type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants