Skip to content

choco source priority is ignored #1541

@daveschafer

Description

@daveschafer

What You Are Seeing?

If you have multiple chocolatey sources, the priority which you give them is not applied.

Quote from the Choco Wiki:

Priority - The priority order of this source as compared to other
sources, lower is better. Defaults to 0 (no priority). All priorities
above 0 will be evaluated first, then zero-based values will be
evaluated in config file order

This issue happens if you have the default source set to 0 or to a higher number than your prefered source.

What is Expected?

The expectation is that every source with priority > 0 is prefered and that the lower the the priority number, the higher the priority. Nevertheless this does not seem to be the case.

Another Quote from Gary Ewan Parker regarding the default behaviour:

Each source can have a priority, which defines the order that Chocolatey searches the sources to find a package. If a package is found on a higher priority source, that package version is used even if there is a newer version on another lower priority source.

How Did You Get This To Happen? (Steps to Reproduce)

In this Example we have ccleaner 5.35.6210 on our own source, the public source provides the version 5.41.6446. Here you can see, that the "chocolatey" priority is set to 2 (same behaviour with 0) and our "tkcloud" source is set to 1 (lower so it should be prefered):

2018-04-18_10h56_00
Nevertheless, the public version is selected.

If we disable the default repository, the correct version from our source is selected:
2018-04-18_10h58_13

We could verify this faulty behaviour on multiple systems. Even a remove and readd of the sources does not resolve this

Output Log

On another note, the choco list commands provides the packages in the correct order:

2018-04-18 12_21_58-auswahlen windows powershell

The only problem seems to be the install commands.

Additional Information

Zendesk ticket 26658

Metadata

Metadata

Assignees

Labels

0 - BacklogIssue is accepted, but is not ready to be worked on or not in current sprint.BugIssues where something has happened which was not expected or intended.CustomerBug reported or feature requested by a licensed customer of Chocolatey.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions