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

Sources should have explicit priority order #71

Closed
ferventcoder opened this issue Feb 5, 2015 · 9 comments
Closed

Sources should have explicit priority order #71

ferventcoder opened this issue Feb 5, 2015 · 9 comments

Comments

@ferventcoder
Copy link
Member

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.

@bc3tech
Copy link
Contributor

bc3tech commented Apr 8, 2015

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)

👍

@wparad
Copy link

wparad commented Apr 8, 2015

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?

@ferventcoder
Copy link
Member Author

@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.

@wparad
Copy link

wparad commented Apr 9, 2015

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 choco install PackageName -source ''http://sourceurl1.com/chocolateyfeed;http://sourceurl2.com/chocaletyfeed''?

@ferventcoder
Copy link
Member Author

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.

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.

@ferventcoder
Copy link
Member Author

Is the mechanism to do that something like choco install PackageName -source ''http://sourceurl1.com/chocolateyfeed;http://sourceurl2.com/chocaletyfeed''?

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.

@ferventcoder ferventcoder modified the milestones: 0.9.9.9, 0.9.10 Sep 21, 2015
@ferventcoder ferventcoder self-assigned this Sep 21, 2015
@ferventcoder
Copy link
Member Author

@bc3tech I just updated the description. If you agree with it, 👍

ferventcoder added a commit that referenced this issue Sep 21, 2015
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.
ferventcoder added a commit that referenced this issue Sep 21, 2015
* 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
@bc3tech
Copy link
Contributor

bc3tech commented Sep 23, 2015

rock on. 👍

@ferventcoder
Copy link
Member Author

RichiCoder1 pushed a commit to RichiCoder1/choco that referenced this issue Sep 24, 2015
RichiCoder1 pushed a commit to RichiCoder1/choco that referenced this issue Sep 24, 2015
ferventcoder added a commit that referenced this issue Sep 24, 2015
…y_To_List_Source

(GH-71) Add priority property to ChocolateySource
ferventcoder added a commit that referenced this issue Oct 11, 2015
* 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
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants