From c10846823e7c342ec3866f14de5e140a0d059b7c Mon Sep 17 00:00:00 2001 From: Rama Krishnan Raghupathy Date: Thu, 25 May 2017 13:01:01 -0700 Subject: [PATCH] remove user profile store Commit migrated from https://github.com/dotnet/core-setup/commit/e742491324e41a45393082e7a1f2bb556d1e73b8 --- .../design-docs/DotNetCore-SharedPackageStore.md | 15 ++------------- src/installer/corehost/cli/args.cpp | 9 --------- src/installer/corehost/cli/args.h | 2 -- src/installer/corehost/cli/deps_resolver.cpp | 5 ----- src/installer/corehost/common/utils.cpp | 11 ----------- src/installer/corehost/common/utils.h | 1 - 6 files changed, 2 insertions(+), 41 deletions(-) diff --git a/docs/installer/design-docs/DotNetCore-SharedPackageStore.md b/docs/installer/design-docs/DotNetCore-SharedPackageStore.md index 051e69a..d13ed25 100644 --- a/docs/installer/design-docs/DotNetCore-SharedPackageStore.md +++ b/docs/installer/design-docs/DotNetCore-SharedPackageStore.md @@ -5,7 +5,7 @@ To enable sharing of assemblies among all machine-wide .NET Core applications, a ### Packages Store -The package store can be either a global system-wide folder or a user local folder: +The package store can be either a global system-wide folder or a dotnet.exe relative folder: + **Global**: - The `dotnet` root location -- on Windows, the folder is located in `C:\Program Files (x86)\`. See layout below. @@ -29,17 +29,6 @@ The package store can be either a global system-wide folder or a user local fold The layout within `netcoreapp*` folders is a NuGet cache layout. -+ **User**: The user local location can be used to override the global location when probing assemblies and uses a very similar layout, except that the `packages/install` folder is NOT supported in the user profile. It is only supported in the global location. - -``` - - %USERPROFILE% or $HOME/ - - .dotnet - - store - - {arch=x86|x64} - = do = -``` - -**OPEN**: Should we have a `dotnet` relative location as well, if operating out of a zip installation of .NET Core binaries? ### Composing a runtime (non-ref) package store @@ -117,7 +106,7 @@ The host will probe in the following order of precedence for `dotnet run` and ap + `$CORE_SERVICING` on Unix or `%ProgramFiles(x86)%\coreservicing` on Windows. + `DOTNET_SHARED_STORE` in the chained order -+ The user local shared package store in `%USERPROFILE%\.dotnet\store` or `$HOME/.dotnet/store` ++ The dotnet.exe relative shared package store + The global shared package store + The Shared Framework directory + ~~`DOTNET_HOSTING_OPTIMIZATION_CACHE` deprecated in favor of `DOTNET_SHARED_STORE`~~ diff --git a/src/installer/corehost/cli/args.cpp b/src/installer/corehost/cli/args.cpp index e42887b..74a4fe3 100644 --- a/src/installer/corehost/cli/args.cpp +++ b/src/installer/corehost/cli/args.cpp @@ -39,15 +39,6 @@ void setup_shared_store_paths(const hostpolicy_init_t& init, const pal::string_t // Environment variable DOTNET_SHARED_STORE (void) get_env_shared_store_dirs(&args->env_shared_store, get_arch(), init.tfm); - // User profile based store - pal::string_t local_shared_store; - if (get_local_shared_store_dir(&local_shared_store)) - { - append_path(&local_shared_store, get_arch()); - append_path(&local_shared_store, init.tfm.c_str()); - args->local_shared_store = local_shared_store; - } - // "dotnet.exe" relative shared store folder if (init.host_mode == host_mode_t::muxer) { diff --git a/src/installer/corehost/cli/args.h b/src/installer/corehost/cli/args.h index cf7827c..6416113 100644 --- a/src/installer/corehost/cli/args.h +++ b/src/installer/corehost/cli/args.h @@ -84,7 +84,6 @@ struct arguments_t pal::string_t core_servicing; std::vector probe_paths; pal::string_t managed_application; - pal::string_t local_shared_store; std::vector global_shared_stores; pal::string_t dotnet_shared_store; std::vector env_shared_store; @@ -107,7 +106,6 @@ struct arguments_t { trace::verbose(_X("-- arguments_t: env shared store: '%s'"), shared.c_str()); } - trace::verbose(_X("-- arguments_t: local shared store: '%s'"), local_shared_store.c_str()); trace::verbose(_X("-- arguments_t: dotnet shared store: '%s'"), dotnet_shared_store.c_str()); for (const auto& global_shared : global_shared_stores) { diff --git a/src/installer/corehost/cli/deps_resolver.cpp b/src/installer/corehost/cli/deps_resolver.cpp index d7807aa..442f1b1 100644 --- a/src/installer/corehost/cli/deps_resolver.cpp +++ b/src/installer/corehost/cli/deps_resolver.cpp @@ -152,11 +152,6 @@ void deps_resolver_t::setup_shared_store_probes( } } - if (pal::directory_exists(args.local_shared_store)) - { - m_probes.push_back(probe_config_t::lookup(args.local_shared_store)); - } - if (pal::directory_exists(args.dotnet_shared_store)) { m_probes.push_back(probe_config_t::lookup(args.dotnet_shared_store)); diff --git a/src/installer/corehost/common/utils.cpp b/src/installer/corehost/common/utils.cpp index b104d32..021459c 100644 --- a/src/installer/corehost/common/utils.cpp +++ b/src/installer/corehost/common/utils.cpp @@ -295,14 +295,3 @@ bool get_global_shared_store_dirs(std::vector* dirs, const pal:: } return true; } - -bool get_local_shared_store_dir(pal::string_t* dir) -{ - if (!pal::get_local_dotnet_dir(dir)) - { - return false; - } - - append_path(dir, RUNTIME_STORE_DIRECTORY_NAME); - return true; -} diff --git a/src/installer/corehost/common/utils.h b/src/installer/corehost/common/utils.h index ec18142..19db50b 100644 --- a/src/installer/corehost/common/utils.h +++ b/src/installer/corehost/common/utils.h @@ -40,6 +40,5 @@ bool parse_known_args( int* num_args); bool skip_utf8_bom(pal::ifstream_t* stream); bool get_env_shared_store_dirs(std::vector* dirs, const pal::string_t& arch, const pal::string_t& tfm); -bool get_local_shared_store_dir(pal::string_t* recv); bool get_global_shared_store_dirs(std::vector* dirs, const pal::string_t& arch, const pal::string_t& tfm); #endif -- 2.7.4