salt icon indicating copy to clipboard operation
salt copied to clipboard

[BUG] pip.installed with upgrade=True and index_url doesn't work

Open Lego3 opened this issue 4 years ago • 3 comments

Description Issue #59100 was closed as having done what was possible for Aluminium, and the situation has indeed improved. There is, however, still an issue when used together with the index_url argument.

Setup With a state like this:

pip3:
  pip.installed:
    - name: pip
    - upgrade: True

Everything works as expected. But with

pip3:
  pip.installed:
    - name: pip
    - upgrade: True
    - index_url: https://pypi.python.org/simple

It always returns "the available upgrade doesn't fulfills the version requirements".

Expected behavior These two should behave the same

Lego3 avatar Feb 09 '22 14:02 Lego3

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey. Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. If you have additional questions, email us at [email protected]. We’re glad you’ve joined our community and look forward to doing awesome things with you!

welcome[bot] avatar Feb 09 '22 14:02 welcome[bot]

I had a quick look at the code myself, and it looks like this commit: https://github.com/saltstack/salt/commit/eaf061a688646518a124965f797fa1a7f99431cb put the code slightly out of place. At the moment the --index-url argument is put right after "pip", but it needs to go after "index versions" or "install".

@s0undt3ch might know more about the reasoning on the location in the code? I.e. could the new code go back to where "install" was previously appended to the command as well?

Lego3 avatar Feb 15 '22 08:02 Lego3

closed by https://github.com/saltstack/salt/pull/61645

Ch3LL avatar Aug 24 '23 20:08 Ch3LL