pip uses the wrong package

Open
#329 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
devops

Research direction

Inspect the package-name selection behind Class[Python::Install] and Package[pip], then reproduce the shown versioned invocation. Done means pip resolves to the version-matched package, such as python27-pip, when that package exists, without changing unrelated package selections.

Written by the indexing model from the issue text.

Description

when using the default provider and changing the version, pip is still installed as either python-pip or python3-pip. For example, in this invocation to install python from ius:

class { 'python':
    ensure => 'present',
    version => 'python27',
    pip => 'present',
    dev => 'present',
    virtualenv => 'present',
    use_epel => false,
}

you get this debug output:

Debug: Executing: '/bin/rpm -q python27 --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n'
Debug: Executing: '/bin/rpm -q python27 --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n --whatprovides'
Notice: (/Stage[main]/Python::Install/Package[python]/ensure) current_value purged, should be present (noop)
Debug: (/Stage[main]/Python::Install/Package[python]) The container Class[Python::Install] will propagate my refresh event
Debug: Executing: '/bin/rpm -q python27-virtualenv --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n'
Debug: Executing: '/bin/rpm -q python27-virtualenv --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n --whatprovides'
Notice: (/Stage[main]/Python::Install/Package[virtualenv]/ensure) current_value purged, should be present (noop)
Debug: (/Stage[main]/Python::Install/Package[virtualenv]) The container Class[Python::Install] will propagate my refresh event
Debug: Executing: '/bin/rpm -q python-pip --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n'
Debug: Executing: '/bin/rpm -q python-pip --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n --whatprovides'
Notice: (/Stage[main]/Python::Install/Package[pip]/ensure) current_value purged, should be present (noop)
Debug: (/Stage[main]/Python::Install/Package[pip]) The container Class[Python::Install] will propagate my refresh event
Debug: Executing: '/bin/rpm -q python27-devel --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n'
Debug: Executing: '/bin/rpm -q python27-devel --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n --whatprovides'
Notice: (/Stage[main]/Python::Install/Package[python-dev]/ensure) current_value purged, should be present (noop)
Debug: (/Stage[main]/Python::Install/Package[python-dev]) The container Class[Python::Install] will propagate my refresh event
Debug: Executing: '/bin/rpm -q python-gunicorn --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n'
Debug: Executing: '/bin/rpm -q python-gunicorn --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n --whatprovides'
Debug: (/Stage[main]/Python::Install/Package[gunicorn]) Nothing to manage: no ensure and the resource doesn't exist

python, devel and virtualenv all have the right package, but pip's is wrong. gunicorn's is also wrong, but there's no python27-gunicorn in ius, so I'm, less worried about that.

Dominant language
Ruby
Stars
196
Forks
372
Avg merge
1d 18m
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from voxpupuli/puppet-python

All issues in voxpupuli/puppet-python

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.