3bdb534321
Currently When performing a system upgrade, Yay will first refresh the database then perform the repo and AUR upgrade. This allows Yay to add some features such as better batch interaction, showing potential dependency problems before the upgrade starts and combined menus showing AUR and repo upgrades together. There has been discussion that this approach is a bad idea. The main issue people have is that the separation of the database refresh and the upgrade could lead to a partial upgrade if Yay fails between the two stages. Personally I do not like this argument, there are valid reasons to Yay to fail between these points. For example there may be dependency or conflict issues during the AUR upgrade. Yay can detect these before any installing actually starts and exit, just like how pacman will when there are dependency problems. If Yay does fail between these points, for the previously mentioned reasons or even a crash then a simple refresh will not cause a partial upgrade by itself. It is then the user's responsibility to either resolve these issues or instead perform an upgrade using pacman directly. My opinions aside, The discussions on the Arch wiki has reached a decision, this method is not recommended. So to follow the decided best practises this behaviour has been disabled by default. This behaviour can be toggled using the --[no]combinedupgrade flag It should be noted that Yay's upgrade menu will not show repo packages unless --combinedupgrade is used. |
||
---|---|---|
.go | ||
completions | ||
doc | ||
testdata/keys | ||
vendor/github.com | ||
.gitignore | ||
callbacks.go | ||
clean.go | ||
cmd.go | ||
completions.go | ||
config.go | ||
dep.go | ||
depCheck.go | ||
depOrder.go | ||
depPool.go | ||
download.go | ||
Gopkg.lock | ||
Gopkg.toml | ||
install.go | ||
ISSUE_TEMPLATE.md | ||
keys_test.go | ||
keys.go | ||
LICENSE | ||
main.go | ||
Makefile | ||
parser_test.go | ||
parser.go | ||
print_test.go | ||
print.go | ||
query_test.go | ||
query.go | ||
README.md | ||
upgrade_test.go | ||
upgrade.go | ||
utils.go | ||
vcs_test.go | ||
vcs.go |
yay
Yet another Yogurt - An AUR Helper written in Go
Packages
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, apacman and pacaur:
- 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.
Features
- 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
Installation
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.
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
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.
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
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 -
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 flagsexport LESS=SRX
. -
Yay is not asking me to edit PKGBUILDS and I don't like diff menu! What do?
yay --editmenu --nodiffmenu --save
-
Only act on AUR packages or only on repo packages?
yay -{OPERATION} --aur
yay -{OPERATION} --repo
Examples of Custom Operations
yay <Search Term>
presents package selection menuyay -Ps
prints system statisticsyay -Pu
prints update listyay -Yc
cleans unneeded dependenciesyay -G
downloads PKGBUILD from ABS or AURyay -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