(#2603) Export pin status#2618
Open
TheCakeIsNaOH wants to merge 6 commits into
Open
Conversation
TheCakeIsNaOH
force-pushed
the
export-pin
branch
from
March 6, 2022 20:28
3f92a95 to
b06294b
Compare
TheCakeIsNaOH
marked this pull request as ready for review
March 6, 2022 20:36
TheCakeIsNaOH
force-pushed
the
export-pin
branch
from
March 9, 2022 16:31
b06294b to
33c2009
Compare
TheCakeIsNaOH
force-pushed
the
export-pin
branch
from
March 21, 2022 16:31
33c2009 to
ae805d4
Compare
TheCakeIsNaOH
force-pushed
the
export-pin
branch
from
June 27, 2022 15:18
ae805d4 to
5c65aa2
Compare
TheCakeIsNaOH
force-pushed
the
export-pin
branch
from
August 11, 2022 23:21
5c65aa2 to
873033e
Compare
TheCakeIsNaOH
marked this pull request as draft
September 23, 2022 04:53
TheCakeIsNaOH
force-pushed
the
export-pin
branch
from
September 24, 2022 22:37
873033e to
290ac65
Compare
TheCakeIsNaOH
marked this pull request as ready for review
September 24, 2022 22:52
TheCakeIsNaOH
force-pushed
the
export-pin
branch
2 times, most recently
from
December 23, 2022 01:22
0befa46 to
90132e7
Compare
TheCakeIsNaOH
force-pushed
the
export-pin
branch
2 times, most recently
from
January 13, 2023 15:26
e378b21 to
b33cdad
Compare
TheCakeIsNaOH
marked this pull request as draft
January 28, 2023 04:16
|
Is there any news on this? It is essential..
So |
Member
|
@aetonsi This PR is in draft and no milestone has been targetted for its release. |
TheCakeIsNaOH
force-pushed
the
export-pin
branch
from
January 10, 2024 00:28
b33cdad to
beab8e7
Compare
Member
Author
|
Rebased on top of #3003 |
TheCakeIsNaOH
marked this pull request as ready for review
January 10, 2024 00:28
TheCakeIsNaOH
force-pushed
the
export-pin
branch
from
April 28, 2024 02:44
beab8e7 to
d2f06e3
Compare
|
Will this feature ever become a reality? |
This helps ensure that package IDs are handled in a case insensitive manner.
This allows overriding of remembered package parameters, install arguments, cache location and execution timeout during upgrade. So a user can pass in different package parameters or arguments without having to completely reinstall the package or turn off remembered arguments. Switch arguments cannot be checked, because the lack of a switch normally would mean that they are just relying on the remembered args to remember it, so there is no way to determine if an override of the remembered args is appropriate.
…ration This adds a new method, GetPackageConfigFromRememberedArguments which is similar to SetConfigFromRememberedArguments, but operates using a different method. First, a OptionSet is set up, so only the config that is passed in is modified, instead of the config that the global options parser was set with with. Second, it returns the modified configuration instead of the original configuration, because it is the local configuration being modified. Third, it has a more general name and changes log messages to be more general, so it later can more easily be reused for uninstall and export. This change fixes remembered arguments when Chocolatey is used as a library, like in ChocolateyGUI, where the config that is passed to the install_run method is not necessarily the same config object that was used to set up the global argument parser. The downside of using a new commandline parser is that it opens up the possibility of drift between the upgrade/global arguments and this added parser. However, this is not an issue because the format of the saved arguments is known, and any added arguments there would not work without being added here as well, which would be picked up during development.
Instead of exporting via building an xml document manually, this creates a PackagesConfigFilePackageSetting and serializes that to create the xml document that is saved. This allows for usage of the same class as is used to read in packages.config files to export those files. The reason the various "Specified" members are added to the PackagesConfigFilePackageSetting class is so if an element is not set during export, it will not show up at all in the resulting serialized packages.config file.
This adds the --include-remembered-arguments option which is used to export any remembered arguments. It reuses the GetPackageConfigFromRememberedArguments method in the NugetService to read and parse the remembered arguments.
This adds the ability for the export command to include pins in the exported file. They will be exported if --include-arguments is specified, but can be excluded with --exclude-pins.
TheCakeIsNaOH
force-pushed
the
export-pin
branch
from
December 24, 2024 18:42
d2f06e3 to
389b9b8
Compare
|
just 1 review is all it takes now? is this becoming a reality? 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description Of Changes
This adds the ability for the export command to include pins in the
exported file. They will be exported if --include-arguments is
specified, but can be excluded with --exclude-pins.
Motivation and Context
See #2603
Testing
.\choco.exe install iperf2 wget --allow-unofficial.\choco.exe pin add -n iperf2 --allow-unofficial.\choco.exe export --include-arguments --allow-unofficialpackages.configincludes<package id="iperf2" pinPackage="true" />.\choco.exe export --include-argument --exclude-pins --allow-unofficialpackages.configdoes not includepinPackageforiperf2Change Types Made
Related Issue
Fixes #2603
Depends on #2506 (and thus #3003 as well)
Change Checklist