-
Notifications
You must be signed in to change notification settings - Fork 905
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
Sources should have explicit priority order #71
Comments
I was just going to put in a request to this effect; enable the ability to re-order sources via command (as opposed to hand-edit or programmatic edit of the config file) 👍 |
I think part of the point was that even if you programmatically edit the config file there is no guarantee that the order of the sources is the order that you would want. Is the order guaranteed? If there are 5 sources, and I add one, is it the 6th one? I think I would be okay with one main source, and the rest of them be equally weighted fall-backs in which the order is irrelevant to me. What configuration should I have to obtain that? |
@wparad The order is based the same way as NuGet currently. So it is the order of the items in the config file. If you add one, it becomes 6th in priority as it will be sixth in the list. |
That may be good enough. I think I will try to generate a sources list on the fly then, in the order I care about, and then use that. For us chocolatey is mostly being called through another tool, so that behavior is likely as good as we need, and being able to use chocolatey to reorder the sources file is not relevant. Is the mechanism to do that something like |
If this is true, why are you commenting? ;) I guess what I mean is, your situation isn't other folks situation so stating that something is "not relevant" doesn't seem appropriate. |
When you specify sources, you are telling choco to use only what is specified. The order is the one on the left is first. Same behavior though, highest priority to first specified source. |
@bc3tech I just updated the description. If you agree with it, 👍 |
When a priority order is specified, sources will order explicitly by that order, lowest number above zero will have the highest priority and so on, then any items with a priority of 0 will be evaluated in configuration file order.
* stable: (GH-417) Choco config command (maint) Config output skip by contains password (GH-416) Features should contain description (GH-88) Modify existing source (GH-71) Sources can have explicit priority order (maint) resharper team settings (maint) Case insensitive String.contains (maint) formatting (GH-89) Note cpack has been deprecated (GH-33) Allow Shutting off checksumming # Conflicts: # src/chocolatey/chocolatey.csproj # src/chocolatey/infrastructure.app/builders/ConfigurationBuilder.cs # src/chocolatey/infrastructure.app/services/ChocolateyConfigSettingsService.cs
rock on. 👍 |
Looks like https://github.com/chocolatey/choco/blob/master/src/chocolatey/infrastructure.app/configuration/ChocolateySource.cs was missed. Let's get it added here as well. |
…y_To_List_Source (GH-71) Add priority property to ChocolateySource
* master: (61 commits) (version) 0.9.10-beta1 (doc) update release notes/nuspec for 0.9.10 (GH-431) Changed Count to ListCount. Added xml docs to List and ListCount. (GH-431) Add Count to IListCommand Uses the IQueryable changes to add an efficient count for retrieving the number of results that would be returned by a list, usually in a much faster, more efficient way. (GH-431) Update Nuget List to use IQueryable as far down as makes sense. Updated Nuget List to attempt to use IQueryable all the way down for queries executed against service based repositories. This allows chocolatey to defer filtering, sorting, and paging to the server rather than the client. Reverts back to the old logic, though, for everything else. (GH-433) Externalize some more package information. Externalizes more package information that was available through the API as properties, but were marked internal. Allows full access to all Package information. (GH-427) Add paging to ListCommand (GH-71) Add priority property to ChocolateySource (GH-416) Named arguments issue after merge (GH-363) Show human-readable file sizes when downloading (GH-392) pass 4.0 reference assemblies to ilmerge (GH-390) Fix log4net dependency version in nuspec (maint) registry specs are Windows only (maint) define windows only tests (doc) update changelog (version) 0.9.10-alpha series (GH-14) Throw when windowsfeature is not plural (GH-14) Log source type evaluated (maint) removing unused variable (GH-14) Allow alternative sources to interact ...
Lower number equals a higher priority. By default the priority order is whatever is in the file, but if any of the items have a priority order greater than zero, explicit priority order is then used.
Once you have any source with a priority number, it will have a higher priority than any source with a priority of 0.
Chocolatey should be set at 50 or 100.Maybe move this to v1.This will keep you from having to actually order them by opening the config file.
The text was updated successfully, but these errors were encountered: