Skip to content

Commit

Permalink
Reorganize pacman/aur, update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nayaverdier committed Oct 29, 2021
1 parent cbb5910 commit 81dc996
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## 0.5.0 2021-10-28

- Add `--version` option to the CLI to display the Instater version
- **BREAKING** `aur`: Delete task (behavior moved into `pacman`)
- `aur`: Now an alias of `pacman`, which supports `makepkg`
- `pacman`: Add `aur` and `become` attributes
- `pacman`: Add support for `makepkg` and `yay` installations

Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Example of `with_fileglob`:
with_fileglob: "applications/*"
```

### `aur` (Arch User Repository)
### `aur` (Arch User Repository, alias of `pacman`)

Install packages from a Arch User Repository

Expand Down Expand Up @@ -445,12 +445,15 @@ tasks

### `pacman`

Install arch linux packages using the `pacman` command
Install Arch Linux packages using the `pacman`, `yay`, or `makepkg` commands

#### Arguments

- `packages` (string, [string]): The packages to install, can be a single package
or a list of packages
- `aur` (boolean, optional): If set to true, the packages will be installed from
the Arch User Repository using `yay` (or `makepkg` as a fallback)
- `become` (string, optional): When `aur` is true, install using a specific user

Examples:

Expand All @@ -463,6 +466,12 @@ Examples:
packages:
- python-setuptools
- python-wheel
- name: Install instater
pacman:
packages:
- instater
aur: true
become: makepkg
```

### `service`
Expand Down
6 changes: 6 additions & 0 deletions instater/tasks/pacman.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,9 @@ def run_action(self, context: Context) -> bool:
self._install(not_installed)

return True


class Aur(Pacman):
def __init__(self, **kwargs):
kwargs["aur"] = True
super().__init__(**kwargs)

0 comments on commit 81dc996

Please sign in to comment.