Skip to content

Conversation

@lrandersson
Copy link
Contributor

@lrandersson lrandersson commented Dec 8, 2025

Description

This PR introduces an issue detected with NSIS GetOptions resetting the value of ARGV_NoRegistry as well as properly accounted for the CLI arg KeepPkgCache, looks like this was ignored before.

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@github-project-automation github-project-automation bot moved this to 🆕 New in 🔎 Review Dec 8, 2025
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Dec 8, 2025
@lrandersson lrandersson marked this pull request as ready for review December 9, 2025 13:37
@lrandersson lrandersson requested a review from a team as a code owner December 9, 2025 13:37

### Bug fixes

* EXE: Fixed an issue for silent installers where command-line argument `/KeepPkgCache` was ignored and `/NoRegistry` would reset the default value.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* EXE: Fixed an issue for silent installers where command-line argument `/KeepPkgCache` was ignored and `/NoRegistry` would reset the default value.
* EXE: Fixed an issue for silent installers where command-line argument `/KeepPkgCache` was ignored and `/NoRegistry` would reset the default value. (#1132)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version = line.split(":")[-1].strip()
if name and version:
break
partial_name = f"{name} {version}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems brittle. Instead of manually parsing the construct.yaml file, I suggest using the UninstallString value and see if it starts with $INSTDIR\Uninstall-:

WriteRegStr SHCTX "${UNINSTREG}" "UninstallString" \
"$\"$INSTDIR\Uninstall-${NAME}.exe$\""

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, what about using the variable installer we get from create_installer? If I'm not mistaken that should be the path to the exe and it is named as <name>-<version>-<build number>-<platform>-<arch>.exe. If we split installer.name on - we have name from [0] and version from [1], let me know what you think.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the installer uses the build number (it's part of the version string), but that could work, too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reduced it to

    installer_file_name_parts = Path(installer).name.split("-")
    name = installer_file_name_parts[0]
    version = installer_file_name_parts[1]
    partial_name = f"{name} {version}"

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Approved in 🔎 Review Dec 10, 2025
@marcoesters marcoesters merged commit 6f7d526 into conda:main Dec 10, 2025
14 of 15 checks passed
@github-project-automation github-project-automation bot moved this from ✅ Approved to 🏁 Done in 🔎 Review Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed [bot] added once the contributor has signed the CLA

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants