yay/README.md

119 lines
4.6 KiB
Markdown
Raw Normal View History

2016-09-05 02:42:05 +00:00
# yay
2018-02-17 18:25:43 +00:00
2016-09-05 02:42:05 +00:00
Yet another Yogurt - An AUR Helper written in Go
2016-10-05 01:11:10 +00:00
`yay: error while loading shared libraries: libalpm.so.10: cannot open shared object file: No such file or directory`
Pacman 5.1 migration explained [here](https://github.com/Jguer/yay/releases/tag/v6.784)
2017-08-05 01:15:12 +00:00
#### Packages
2018-02-17 18:25:43 +00:00
2018-04-28 16:35:53 +00:00
[![yay](https://img.shields.io/aur/version/yay.svg?label=yay)](https://aur.archlinux.org/packages/yay/) [![yay-bin](https://img.shields.io/aur/version/yay-bin.svg?label=yay-bin)](https://aur.archlinux.org/packages/yay-bin/) [![yay-git](https://img.shields.io/aur/version/yay-git.svg?label=yay-git)](https://aur.archlinux.org/packages/yay-git/) [![GitHub license](https://img.shields.io/github/license/jguer/yay.svg)](https://github.com/Jguer/yay/blob/master/LICENSE)
2016-10-05 01:11:10 +00:00
There's a point in everyone's life when you feel the need to write an AUR helper because there are only about 20 of them.
So say hi to 20+1.
Yay was created with a few objectives in mind and based on the design of [yaourt](https://github.com/archlinuxfr/yaourt), [apacman](https://github.com/oshazard/apacman) and [pacaur](https://github.com/rmarquis/pacaur):
2016-10-05 01:11:10 +00:00
2018-02-17 18:25:43 +00:00
* Have almost no dependencies.
* Provide an interface for pacman.
* Have yaourt like search.
* Minimize user input
* Know when git packages are due for an upgrade.
2016-12-10 00:12:09 +00:00
2017-04-17 13:03:47 +00:00
## Features
2018-02-17 18:25:43 +00:00
* AUR Tab completion
* Download PKGBUILD from ABS or AUR
* Ask all questions first and then start building
* Search narrowing (`yay linux header` will first search linux and then narrow on header)
* No sourcing of PKGBUILD is done
* The binary has no dependencies that pacman doesn't already have.
* Advanced dependency solving
* Remove make dependencies at the end of the build process
2016-12-16 02:34:04 +00:00
## Installation
2018-03-01 16:13:46 +00:00
If you are migrating from another AUR helper you can simply install Yay from
the AUR like any other package.
The initial installation of Yay can be done by cloning the PKGBUILD and
building with makepkg.
```sh
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
```
## Contributing
Contributors are always welcome!
If you plan to make any large changes or changes that may not be 100% agreed
on, we suggest opening an issue detailing your ideas first.
Otherwise send us a pull request and we will be happy to review it.
### Code Style
2018-05-12 16:16:48 +00:00
All code should be formatted through `go fmt`. This tool will automatically
format code for you. Although it is recommended you write code in this style
and just use this tool to catch mistakes.
### Building
Yay is easy to build with its only build dependency being `go` and the
assumption of `base-devel` being installed.
Run `make` to build Yay. This will generate a binary called `yay` in the same
directory as the Makefile.
Run `make test` to test Yay. This will check the code is formatted correctly,
run the code through `go vet` and run unit tests.
2018-05-12 16:16:48 +00:00
Yay's Makefile automatically sets the `GOPATH` to `$PWD/.go`. This makes it easy to
build using the dependencies in `vendor/`. Running manual go commands such as
`go build` will require that you to either set the `GOPATH` manually or `go get`
The dependencies into your own `GOPATH`.
### Vendored Dependencies
Yay depends on a couple of other projects. These are stored in `vendor/` and
2018-05-12 16:16:48 +00:00
are built into Yay at build time. They do not need to be installed separately.
Currently yay Depends on:
* https://github.com/Jguer/go-alpm
* https://github.com/mikkeloscar/gopkgbuild
* https://github.com/mikkeloscar/aur
## Frequently Asked Questions
* Yay does not display colored output. How do I fix it?
Make sure you have the `Color` option in your `/etc/pacman.conf` [#123](https://github.com/Jguer/yay/issues/123)
2018-06-04 18:22:16 +00:00
* Sometimes diffs are printed to the terminal and other times they are pages
via less. How do I fix this?
Yay uses `git diff` to display diffs, by default git tells less to not page
if the output can fit one terminal length. This can be overridden by
exporting your own flags `export LESS=SRX`.
## Examples of Custom Operations
2018-02-17 18:25:43 +00:00
* `yay <Search Term>` presents package selection menu
* `yay -Ps` prints system statistics
* `yay -Pu` prints update list
* `yay -Yc` cleans unneeded dependencies
2018-03-07 12:11:48 +00:00
* `yay -G` downloads PKGBUILD from ABS or AUR
2018-02-17 18:25:43 +00:00
* `yay -Y --gendb` generates development package DB used for devel updates.
* `yay -Syu --devel --timeupdate` Normal update but also check for development
package updates and uses PKGBUILD modification time and not version to
determine update
2017-04-17 13:03:47 +00:00
## Images
<img src="https://cdn.rawgit.com/Jguer/jguer.github.io/5412b8d6/yay/yay-ps.png" width="450">
<img src="https://cdn.rawgit.com/Jguer/jguer.github.io/5412b8d6/yay/yayupgrade.png" width="450">
<img src="https://cdn.rawgit.com/Jguer/jguer.github.io/5412b8d6/yay/yaysearch.png" width="450">