Skip to content

Commit

Permalink
Add a dedicated package manager for yum.
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeldycke committed Apr 25, 2022
1 parent 8104b3b commit 69f5f8b
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 3 deletions.
3 changes: 2 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This version is not released yet and is under active development.
- \[zypper\] Add `zypper` support for Suse and OpenSuse. Closes {issue}`566`.
- \[emerge\] Add `emerge` support.
- \[steamcmd\] Add `steamcmd` support. Refs {issue}`10`.
- \[yum\] Add dedicated `yum` package manager. Refs {issue}`415`.
- \[bar-plugin\] Add new `DEFAULT_FONT` and `MONOSPACE_FONT` variable.
- \[bar-plugin\] Rename all reference of `xbar` to the generic `bar-plugin` label.
- \[bar-plugin\] Improve search for Python and `mpm` executable.
Expand Down Expand Up @@ -62,7 +63,7 @@ This version is not released yet and is under active development.
## {gh}`4.12.0 (2022-04-04) <compare/v4.11.0...v4.12.0>`

- \[dnf\] Add support for `dnf`. Closes {issue}`516`, refs {issue}`415`.
- \[dnf\] Allow `yum` to act as `dnf`. Closes {issue}`415`.
- \[yum\] Allow `yum` to act as `dnf`. Closes {issue}`415`.
- \[brew,cask\] Fix execution of `sync` command.
- \[mpm\] Fix extraction of version. Closes {issue}`536`.

Expand Down
8 changes: 7 additions & 1 deletion meta_package_manager/managers/dnf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class DNF(PackageManager):

requirement = "4.0.0"

cli_names = ("dnf", "yum")
cli_names = ("dnf",)

"""
.. code-block:: shell-session
Expand Down Expand Up @@ -200,3 +200,9 @@ def cleanup(self):
"""
self.run_cli("--assumeyes", "autoremove", sudo=True)
self.run_cli("clean", "all")


class YUM(DNF):
"""yum is dnf is yum"""

cli_names = ("yum",)
1 change: 1 addition & 0 deletions meta_package_manager/tests/test_cli_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def test_no_package_id(self, invoke):
"steamcmd": "",
"vscode": "tamasfe.even-better-toml",
"yarn": "markdown",
"yum": "usd",
"zypper": "git",
}
assert set(PACKAGE_IDS) == set(pool.all_manager_ids)
Expand Down
2 changes: 1 addition & 1 deletion meta_package_manager/tests/test_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

def test_manager_count():
"""Check all implemented package managers are accounted for, and unique."""
assert len(pool) == 21
assert len(pool) == 22
assert len(pool) == len(pool.all_manager_ids)
assert pool.all_manager_ids == tuple(sorted(set(pool)))

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ keywords = [
'xbar',
'swiftbar',
'yarn',
'yum',
'zypper',
]
classifiers = [
Expand Down
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ ______________________________________________________________________
| [`steamcmd`](https://developer.valvesoftware.com/wiki/SteamCMD) | None | 🍎 | 🐧 | πŸͺŸ | | | | βœ“ | βœ“ | | |
| [`vscode`](https://code.visualstudio.com) | 1.60.0 | 🍎 | 🐧 | πŸͺŸ | βœ“ | | βœ“ | βœ“ | | | |
| [`yarn`](https://yarnpkg.com) | 1.21.0 | 🍎 | 🐧 | πŸͺŸ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | | βœ“ |
| [`yum`](http://yum.baseurl.org) | 4.0.0 | | 🐧 | | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ |
| [`zypper`](https://en.opensuse.org/Portal:Zypper) | 1.14.0 | | 🐧 | | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ |

## Quickstart
Expand Down Expand Up @@ -117,6 +118,7 @@ $ mpm --all-managers managers
β”‚ SteamCMD β”‚ steamcmd β”‚ βœ“ β”‚ βœ“ /opt/local/bin/steamcmd β”‚ βœ“ β”‚ βœ“ 1648077083 β”‚
β”‚ Visual Studio Code β”‚ vscode β”‚ βœ“ β”‚ βœ“ /usr/local/bin/code β”‚ βœ“ β”‚ βœ“ 1.61.0 β”‚
β”‚ Node's yarn β”‚ yarn β”‚ βœ“ β”‚ ✘ yarn not found β”‚ β”‚ β”‚
β”‚ YUM β”‚ yum β”‚ ✘ Linux only β”‚ ✘ yum not found β”‚ β”‚ β”‚
β”‚ Zypper β”‚ zypper β”‚ ✘ Linux only β”‚ ✘ zypper not found β”‚ β”‚ β”‚
╰────────────────────┴──────────┴────────────────┴───────────────────────────┴────────────┴──────────────╯
```
Expand Down

0 comments on commit 69f5f8b

Please sign in to comment.