pyinfra-dev / pyinfra-dev/pyinfra

Use distro information in `server.packages` (apt would be picked over zypper)

Open
#799 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

operations
Dominant language
Python
Stars
6k
Forks
548
Avg merge
7d 17h
Merged PRs (30d)
13

Description

https://github.com/Fizzadar/pyinfra/blob/c1c9437716c847f24d032543443ad7f483ac0931/pyinfra/operations/server.py#L520-L521

While this should work in general, I think this might deliver surprising results for example for openSUSE. An openSUSE install is shipping aptitude with a symlink to apt. But apt might behave different from zypper, which most people would expect to be invoked in this case.

Checking the distribution version with distro might deliver more reliable results.

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.

Research direction

Start at pyinfra/operations/server.py lines 520-521 and review how server.packages selects apt or zypper. Check how the distro package represents openSUSE and how that information can guide the selection. Done means an openSUSE host selects zypper rather than apt without changing expected behavior for other distributions.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.