This is a rewrite of the dependency system, It aims to be cleaner
written, with a better idea of what is needed from the start, meaning
less new code being hacked on for things that were not thought about.
This version also aims to use as many small functions as possible, for
cleaner code and better testing.
Added dep.go:
general dependency functions
Added depPool.go:
Replacement of depTree, dependencies were never ordered so
a tree did not really make sense. Instead the term pool
makes more sense.
Added depOrder.go:
Replacement of depCatagories, This simply orders the
dependencies, dependencies are still catagorized as repo and AUR
but I believe this to be a better name
Added depCheck.go:
Replaces conflicts.go and also contains the missing dependency
code
This version is mostly the same as the old version with a few
improvments:
Missing packages will print the full dependency tree
Versioned dependency checking errors should be fixed
Make depends should be calculated properly
Experimental AUR provide searcher
This code has been added along side the old code for testing and is not
currently used by the install process. Once the install process is moved
to use this code, the old code will be removed.
yay
Yet another Yogurt - An AUR Helper written in Go
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
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 headerwill 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
Coloroption in your/etc/pacman.conf#123
Examples of Custom Operations
yay <Search Term>presents package selection menuyay -Psprints system statisticsyay -Puprints update listyay -Yccleans unneeded dependenciesyay -Gdownloads PKGBUILD from ABS or AURyay -Y --gendbgenerates development package DB used for devel updates.yay -Syu --devel --timeupdateNormal update but also check for development package updates and uses PKGBUILD modification time and not version to determine update
Images