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

Update deprecate-a-chocolatey-package.md #949

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,20 @@ When deprecating a Chocolatey Package, the following steps should be followed:
* Create a **[new version](xref:create-packages#package-fix-version-notation)** of the deprecated Chocolatey Package.
* Prepend **[Deprecated]** to the **title** of the package (e.g. `<title>[Deprecated] Software Title</title>`
* Update the package **description**: Why is the package being deprecated?
* Add a **[dependency](http://docs.nuget.org/docs/reference/nuspec-reference#Specifying_Dependencies) on the other package** (if the package is being superseded).
* **Remove all files** except the `.nuspec` from the Chocolatey Package.
* Replace `<files>...</files>` section in `.nuspec` with `<files />` tag to prevent any file from being included with the package.
### The package is being superseded
* Add a **[dependency](http://docs.nuget.org/docs/reference/nuspec-reference#Specifying_Dependencies) on the other package**.
* **Replace** `<files>...</files>` section in `.nuspec` with `<files />` tag to prevent any file from being included with the package.
* **Remove all files** except the `.nuspec` from the Chocolatey Package.
### The package is no longer available and is not being superseded
* **Remove** `<dependencies>...</dependencies>` if any, except if there is only a dependency linking to the install ([packagename].install) or the portable ([packagename].portable) version of this same package. In this case, remember to update the package version of the targeted package.
* **Remove** the content of `tools\chocolateyInstall.ps1` if any.
* **Remove all files** except the `.nuspec` and `tools\chocolateyInstall.ps1` from the Chocolatey Package.

In both cases:
* If they are no longer available, **remove** `<projectSourceUrl>...</projectSourceUrl>`, `<docsUrl>...</docsUrl>`, `<mailingListUrl>...</mailingListUrl>`, `<bugTrackerUrl>...</bugTrackerUrl>`, `<releaseNotes>...</releaseNotes>`
* **Remove the iconUrl**.
* **[Unlist all versions](xref:list-unlist-a-package)** from the package gallery, **except** the final deprecated version. The final deprecated version is required so that there is an update path to the new package.
* **[Unlist all versions](xref:list-unlist-a-package)** from the package gallery, **except** the final deprecated version. The final deprecated version is required to, depending on the case, provide an update path to the new package or provide an empty package.

By following this process, any existing users who try to update the old package will automatically get the new package, as it will be installed as a dependency.
By following this process, any existing users who try to update the old package will automatically get either:
* **The new package**, as it will be installed as a dependency if the package is being superseded.
* **A new version package doing nothing** if the package does no longer exist.