How to create a package with dependencies that require reboots #2082
-
Hi @ferventcoder, I'm completely lost, creating a package that has a dependency to dotnet4.x, kb2919355 and dotnet3.5. two of these dependencys need reboot after installation. https://chocolatey.org/packages/garmin-express Any suggestion? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Chocolatey and RebootsChocolatey itself as a package manager will never perform a reboot - it's simply not in its purview to do that. However, it will tell you that you need to reboot, and with Chocolatey v0.10.12+ you can even set a feature flag for Chocolatey to stop execution if a needed reboot is detected (more on that in next section). There are other tools that do infrastructure / configuration management where it would be in the purview of those tools to perform reboots. In those cases, those tools could perform reboots when needed. Exit codes / stop on need for rebootOne thing you can do that will help with locally running Chocolatey and integrations is have Chocolatey stop with certain exit codes that inform of a need for a reboot. They would even inform on what the next steps are. Those codes:
The feature flag you are looking for is
To get the 3010 exit code, you may need to ensure Community Package Maintainer & InfrastructureIf you are maintaining packages and you add dependencies that need reboots, that's completely fine. As part of the instructions you receive by email, it lays out how to contain maintainers to request an exemption from the verifier that currently does not handle reboots. So take the dependencies, then remember to reach back out to the moderators through the package review form to ask for an exemption due to x dependency requiring a reboot. As of 02 SEP 2020, we are taking to pre-install some of the KB dependencies that would normally require reboots, so hopefully the need for handling reboots on the community won't be necessary as much. |
Beta Was this translation helpful? Give feedback.
Chocolatey and Reboots
Chocolatey itself as a package manager will never perform a reboot - it's simply not in its purview to do that. However, it will tell you that you need to reboot, and with Chocolatey v0.10.12+ you can even set a feature flag for Chocolatey to stop execution if a needed reboot is detected (more on that in next section).
There are other tools that do infrastructure / configuration management where it would be in the purview of those tools to perform reboots. In those cases, those tools could perform reboots when needed.
Exit codes / stop on need for reboot
One thing you can do that will help with locally running Chocolatey and integrations is have Chocolatey stop with…