diff --git a/src/chocolatey.resources/helpers/ChocolateyTabExpansion.ps1 b/src/chocolatey.resources/helpers/ChocolateyTabExpansion.ps1 index 3988f77547..4449b7ba89 100644 --- a/src/chocolatey.resources/helpers/ChocolateyTabExpansion.ps1 +++ b/src/chocolatey.resources/helpers/ChocolateyTabExpansion.ps1 @@ -51,11 +51,11 @@ $commandOptions = @{ list = "--lo --id-only --pre --exact --by-id-only --id-starts-with --detailed --approved-only --not-broken --source='' --user='' --password='' --local-only --prerelease --include-programs --page='' --page-size='' --order-by-popularity --download-cache-only --disable-package-repository-optimizations" + $proListOptions + $allcommands search = "--pre --exact --by-id-only --id-starts-with --detailed --approved-only --not-broken --source='' --user='' --password='' --local-only --prerelease --include-programs --page='' --page-size='' --order-by-popularity --download-cache-only --disable-package-repository-optimizations" + $proListOptions + $allcommands info = "--pre --lo --source='' --user='' --password='' --local-only --prerelease --disable-package-repository-optimizations" + $proInfoOptions + $allcommands - install = "-y -whatif -? --pre --version= --params='' --install-arguments='' --override-arguments --ignore-dependencies --source='' --source='windowsfeatures' --source='webpi' --user='' --password='' --prerelease --forcex86 --not-silent --package-parameters='' --exit-when-reboot-detected --ignore-detected-reboot --allow-downgrade --force-dependencies --require-checksums --use-package-exit-codes --ignore-package-exit-codes --skip-automation-scripts --allow-multiple-versions --ignore-checksums --allow-empty-checksums --allow-empty-checksums-secure --download-checksum='' --download-checksum-type='' --download-checksum-x64='' --download-checksum-type-x64='' --stop-on-first-package-failure --disable-package-repository-optimizations --pin" + $proInstallUpgradeOptions + $allcommands + install = "-y -whatif -? --pre --version= --params='' --install-arguments='' --override-arguments --ignore-dependencies --source='' --source='windowsfeatures' --user='' --password='' --prerelease --forcex86 --not-silent --package-parameters='' --exit-when-reboot-detected --ignore-detected-reboot --allow-downgrade --force-dependencies --require-checksums --use-package-exit-codes --ignore-package-exit-codes --skip-automation-scripts --allow-multiple-versions --ignore-checksums --allow-empty-checksums --allow-empty-checksums-secure --download-checksum='' --download-checksum-type='' --download-checksum-x64='' --download-checksum-type-x64='' --stop-on-first-package-failure --disable-package-repository-optimizations --pin" + $proInstallUpgradeOptions + $allcommands pin = "--name='' --version='' -?" + $proPinOptions + $allcommands outdated = "-? --source='' --user='' --password='' --ignore-pinned --ignore-unfound --pre --prerelease --disable-package-repository-optimizations" + $proOutdatedOptions + $allcommands - upgrade = "-y -whatif -? --pre --version='' --except='' --params='' --install-arguments='' --override-arguments --ignore-dependencies --source='' --source='windowsfeatures' --source='webpi' --user='' --password='' --prerelease --forcex86 --not-silent --package-parameters='' --exit-when-reboot-detected --ignore-detected-reboot --allow-downgrade --allow-multiple-versions --require-checksums --use-package-exit-codes --ignore-package-exit-codes --skip-automation-scripts --fail-on-unfound --fail-on-not-installed --ignore-checksums --allow-empty-checksums --allow-empty-checksums-secure --download-checksum='' --download-checksum-type='' --download-checksum-x64='' --download-checksum-type-x64='' --exclude-prerelease --stop-on-first-package-failure --use-remembered-options --ignore-remembered-options --skip-when-not-installed --install-if-not-installed --disable-package-repository-optimizations --pin" + $proInstallUpgradeOptions + $proUpgradeOptions + $allcommands - uninstall = "-y -whatif -? --force-dependencies --remove-dependencies --all-versions --source='windowsfeatures' --source='webpi' --version= --uninstall-arguments='' --override-arguments --not-silent --params='' --package-parameters='' --exit-when-reboot-detected --ignore-detected-reboot --use-package-exit-codes --ignore-package-exit-codes --skip-automation-scripts --use-autouninstaller --skip-autouninstaller --fail-on-autouninstaller --ignore-autouninstaller-failure --stop-on-first-package-failure" + $proUninstallOptions + $allcommands + upgrade = "-y -whatif -? --pre --version='' --except='' --params='' --install-arguments='' --override-arguments --ignore-dependencies --source='' --source='windowsfeatures' --user='' --password='' --prerelease --forcex86 --not-silent --package-parameters='' --exit-when-reboot-detected --ignore-detected-reboot --allow-downgrade --allow-multiple-versions --require-checksums --use-package-exit-codes --ignore-package-exit-codes --skip-automation-scripts --fail-on-unfound --fail-on-not-installed --ignore-checksums --allow-empty-checksums --allow-empty-checksums-secure --download-checksum='' --download-checksum-type='' --download-checksum-x64='' --download-checksum-type-x64='' --exclude-prerelease --stop-on-first-package-failure --use-remembered-options --ignore-remembered-options --skip-when-not-installed --install-if-not-installed --disable-package-repository-optimizations --pin" + $proInstallUpgradeOptions + $proUpgradeOptions + $allcommands + uninstall = "-y -whatif -? --force-dependencies --remove-dependencies --all-versions --source='windowsfeatures' --version= --uninstall-arguments='' --override-arguments --not-silent --params='' --package-parameters='' --exit-when-reboot-detected --ignore-detected-reboot --use-package-exit-codes --ignore-package-exit-codes --skip-automation-scripts --use-autouninstaller --skip-autouninstaller --fail-on-autouninstaller --ignore-autouninstaller-failure --stop-on-first-package-failure" + $proUninstallOptions + $allcommands new = "--template-name='' --output-directory='' --automaticpackage --version='' --maintainer='' packageversion='' maintainername='' maintainerrepo='' installertype='' url='' url64='' silentargs='' --use-built-in-template -?" + $proNewOptions + $allcommands pack = "--version='' --output-directory='' -?" + $allcommands push = "--source='' --api-key='' --timeout='' -?" + $proPushOptions + $allcommands diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyInstallCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyInstallCommand.cs index afd4390e58..b411b0affe 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyInstallCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyInstallCommand.cs @@ -264,6 +264,7 @@ Side by side installations has been deprecated and will be removed in v2.0.0. if similar functionality is needed going forward. "); "chocolatey".Log().Warn(NugetService.InstallWithFilePathDeprecationMessage); + "chocolatey".Log().Warn(WebPiService.DeprecationMessage); "chocolatey".Log().Info(ChocolateyLoggers.Important, "Usage"); "chocolatey".Log().Info(@" @@ -398,7 +399,7 @@ This specifies the source is Ruby Gems and that we are installing a the command will install that first. e.g. `choco install compass -source ruby` -WebPI +WebPI (DEPRECATED) This specifies the source is Web PI (Web Platform Installer) and that we are installing a WebPI product, such as IISExpress. If you do not have the Web PI command line installed, it will install that first and diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyListCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyListCommand.cs index 5eaf697342..f477b4932e 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyListCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyListCommand.cs @@ -176,9 +176,10 @@ choco search [] clist [] (DEPRECATED, will be removed in v2.0.0) "); + "chocolatey".Log().Warn(ChocolateyLoggers.Important, "DEPRECATION NOTICE"); + if (configuration.CommandName.is_equal_to("list")) { - "chocolatey".Log().Warn(ChocolateyLoggers.Important, "DEPRECATION NOTICE"); "chocolatey".Log().Warn(@" Starting in v2.0.0 the list command will be made local only and will only work with the installed packages. All options available for connecting @@ -189,11 +190,13 @@ Starting in v2.0.0 the list command will be made local only and will only or `choco find` instead. These will continue to work as usual. Starting in v2.0.0 the shortcut `clist` will be removed and can not be used - to list package anymore. We recommend you make sure that you always + to list packages anymore. We recommend you make sure that you always use the full command going forward (`choco list`). "); } + "chocolatey".Log().Warn(WebPiService.DeprecationMessage); + "chocolatey".Log().Info(ChocolateyLoggers.Important, "Examples"); "chocolatey".Log().Info(@" choco list --local-only (DEPRECATED: will be default for list in v2.0.0) @@ -248,7 +251,7 @@ file a ticket so we can document it at "chocolatey".Log().Info(@" Available in 0.9.10+. -WebPI +WebPI (DEPRECATED) This specifies the source is Web PI (Web Platform Installer) and that we are searching for a WebPI product, such as IISExpress. If you do not have the Web PI command line installed, it will install that first diff --git a/src/chocolatey/infrastructure.app/domain/SourceType.cs b/src/chocolatey/infrastructure.app/domain/SourceType.cs index 1a56dccd36..b5b6bfa6c6 100644 --- a/src/chocolatey/infrastructure.app/domain/SourceType.cs +++ b/src/chocolatey/infrastructure.app/domain/SourceType.cs @@ -26,7 +26,7 @@ public enum SourceType { //this is what it should be when it's not set normal, - + [Obsolete("The WebPI service has been retired, and this source type will be removed in v2.0.0 of Chocolatey.")] webpi, ruby, python, diff --git a/src/chocolatey/infrastructure.app/domain/SourceTypes.cs b/src/chocolatey/infrastructure.app/domain/SourceTypes.cs index 5273693280..973f2d7a77 100644 --- a/src/chocolatey/infrastructure.app/domain/SourceTypes.cs +++ b/src/chocolatey/infrastructure.app/domain/SourceTypes.cs @@ -14,6 +14,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; + namespace chocolatey.infrastructure.app.domain { /// @@ -50,6 +52,7 @@ public static class SourceTypes /// The source is of type Web PI and need to be handled by an /// alternative source runner. /// + [Obsolete("The WebPI service has been retired, and this source type will be removed in v2.0.0 of Chocolatey.")] public const string WEBPI = "webpi"; /// diff --git a/src/chocolatey/infrastructure.app/services/WebPiService.cs b/src/chocolatey/infrastructure.app/services/WebPiService.cs index 4d5cfe6d14..96b70382ad 100644 --- a/src/chocolatey/infrastructure.app/services/WebPiService.cs +++ b/src/chocolatey/infrastructure.app/services/WebPiService.cs @@ -28,6 +28,7 @@ namespace chocolatey.infrastructure.app.services using results; using platforms; + [Obsolete("The WebPI service has been retired, and this source type will be removed in v2.0.0 of Chocolatey.")] public sealed class WebPiService : ISourceRunner { private readonly ICommandExecutor _commandExecutor; @@ -127,6 +128,19 @@ public void ensure_source_app_installed(ChocolateyConfiguration config, Action

list_run(ChocolateyConfiguration config) { + write_deprecation_warning(); var packageResults = new List(); var args = ExternalCommandArgsBuilder.build_arguments(config, _listArguments); @@ -191,6 +207,7 @@ public IEnumerable list_run(ChocolateyConfiguration config) public void install_noop(ChocolateyConfiguration config, Action continueAction) { + write_deprecation_warning(); var args = ExternalCommandArgsBuilder.build_arguments(config, _installArguments); args = args.Replace(PACKAGE_NAME_TOKEN, config.PackageNames.Replace(';', ',')); this.Log().Info("Would have run '{0} {1}'".format_with(EXE_PATH.escape_curly_braces(), args.escape_curly_braces())); @@ -198,6 +215,7 @@ public void install_noop(ChocolateyConfiguration config, Action c public ConcurrentDictionary install_run(ChocolateyConfiguration config, Action continueAction) { + write_deprecation_warning(); var packageResults = new ConcurrentDictionary(StringComparer.InvariantCultureIgnoreCase); var args = ExternalCommandArgsBuilder.build_arguments(config, _installArguments); @@ -255,22 +273,26 @@ public ConcurrentDictionary install_run(ChocolateyConfigu public ConcurrentDictionary upgrade_noop(ChocolateyConfiguration config, Action continueAction) { + write_deprecation_warning(); this.Log().Warn(ChocolateyLoggers.Important, "{0} does not implement upgrade".format_with(APP_NAME)); return new ConcurrentDictionary(StringComparer.InvariantCultureIgnoreCase); } public ConcurrentDictionary upgrade_run(ChocolateyConfiguration config, Action continueAction, Action beforeUpgradeAction = null) { + write_deprecation_warning(); throw new NotImplementedException("{0} does not implement upgrade".format_with(APP_NAME)); } public void uninstall_noop(ChocolateyConfiguration config, Action continueAction) { + write_deprecation_warning(); this.Log().Warn(ChocolateyLoggers.Important, "{0} does not implement uninstall".format_with(APP_NAME)); } public ConcurrentDictionary uninstall_run(ChocolateyConfiguration config, Action continueAction, Action beforeUninstallAction = null) { + write_deprecation_warning(); throw new NotImplementedException("{0} does not implement uninstall".format_with(APP_NAME)); }