Yay

另一种 Yaourt -- 用 Go 编写的 AUR 助手。「Yet another Yogurt - An AUR Helper written in Go」

Github stars Tracking Chart

Yay

另一种 Yaourt -- 用 Go 编写的 AUR 助手。

注:Yaourt(Yet Another User Repository Tool)是一个高级的命令行工具,用于在 Arch Linux 上安装软件包。

目标

在每个人的生命中都会有这样的时刻:你觉得有必要写一个AUR助手,因为AUR只有20个左右。所以向20+1问好吧。

Yayyaourt、apacman和pacaur的设计。它的开发是以这些目标为基础的。

Yay 是基于 yaourtapacmanpacaur的设计。它的开发是以这些目标为基础的:

  • 为 pacman 提供一个界面
  • Yaourt 风格的交互式搜索/安装
  • 最小化依赖性
  • 最小化用户输入
  • 知道什么时候 git 包该升级了

特点

  • 执行先进的依赖性解决方法
  • 从 ABS 或 AUR 下载 PKGBUILDs
  • 通过标签完成 AUR
  • 提前查询用户的所有输入(在开始构建之前)。
  • 缩小搜索范围(yay linux header 将首先搜索 linux,然后在 header 上缩小)
  • 在搜索过程中找到匹配的软件包提供者,并允许选择
  • 在构建过程结束时移除 make 的依赖性
  • 运行时无需从 PKGBUILD 获得源

安装

如果你是从另一个 AUR 助手迁移过来的,你可以简单地用该助手安装 Yay。

另外,Yay 的初始安装可以通过克隆 PKGBUILD 和用 makepkg 构建来完成。

在你开始之前,确保你已经安装了 base-devel 包组。

pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si

支持

所有与 Yay 相关的支持都应该通过 GitHub 问题来申请。由于 Yay 没有得到 Arch Linux 的官方支持,所以不应该在论坛、AUR 评论或其他官方渠道寻求支持。

损坏的 AUR 软件包应该在该软件包的 AUR 页面上以评论的形式报告。只有当一个软件包在 makepkg 中无法构建时,才可以被认为是损坏的。报告应该使用 makepkg,并包括完整的输出以及任何其他相关信息。切勿使用 Yay 或任何其他外部工具制作报告。

常见问题

Yay 不显示彩色的输出。我怎样才能解决这个问题?

确保你在 /etc/pacman.conf 中加入了颜色选项(见问题 #123)。

Yay 在系统升级时没有提示跳过软件包。

默认行为在 v8.918 之后被改变了(见 3bdb534 和 issue #554)。要恢复跳过软件包的行为,请使用 --combinedupgrade (通过添加 --save 使其永久化)。注意:跳过软件包将使你的系统处于 部分升级的状态

有时差异会被打印到终端,有时则通过 less 进行分页。我如何解决这个问题?

Yay 使用 git diff 来显示差异,默认情况下,如果输出能装入一个终端长度,它就会告诉 less 不要分页。这种行为可以通过导出你自己的标志(export LESS=SRX)来覆盖。

Yay 不要求我编辑 PKGBUILDS,而且我不喜欢 diff 菜单! 我可以做什么?

yay --editmenu --nodiffmenu --save

我怎样才能告诉 Yay 只对 AUR 包采取行动,或者只对 repo 包采取行动?

yay -{OPERATION} --aur yay -{OPERATION} --repo

显示了一个 Out Of Date AUR 包的信息。为什么 Yay 不更新它们?

这条信息并不意味着更新的 AUR 包是可用的。它意味着这些包在 AUR 上被标记为过期,但它们的维护者还没有更新 PKGBUILDs(见 过时的 AUR 包)。

Yay 在安装过程中不会安装添加到 PKGBUILD 中的依赖项。

Yay 提前解决了所有的依赖关系。你可以自由地以任何方式编辑 PKGBUILD,但你造成的任何问题都是你自己的,不应该被报告,除非它们可以用原始的 PKGBUILD 重现。

我知道我的 -git 包有更新,但 Yay 不提供更新?

Yay 为开发包使用一个哈希缓存。通常情况下,它在软件包安装的最后更新,信息是 Found git repo。如果你在 aur 助手之间转换,并且在某个时候没有用 yay 安装开发包,有可能它从未被添加到缓存中。yay -Y -gendb 将修复每个开发包的当前版本并从那里开始检查。

我想帮忙!

查看 CONTRIBUTING.md 获取更多信息。

自定义操作的例子

命令 描述
yay <搜索词> 显示软件包安装选择菜单。
yay -Ps 打印系统统计数据。
yay -Yc 清除不需要的依赖。
yay -G <AUR Package> 从 ABS 或 AUR 下载 PKGBUILD。
yay -Y --gendb 生成用于开发更新的开发包数据库。
yay -Syu --devel --timeupdate 执行系统升级,但也检查开发包的更新,并使用 PKGBUILD 的修改时间(不是版本号)来确定更新。

图片

请参考自述文件。

其他 AUR 助手/工具


Overview

Name With OwnerJguer/yay
Primary LanguageGo
Program languageMakefile (Language Count: 4)
PlatformLinux
License:GNU General Public License v3.0
Release Count97
Last Release Namev12.3.5 (Posted on )
First Release Namev1.70 (Posted on )
Created At2016-09-05 02:41:34
Pushed At2024-04-22 00:36:13
Last Commit At
Stargazers Count10.3k
Watchers Count71
Fork Count345
Commits Count2.2k
Has Issues Enabled
Issues Count1408
Issue Open Count133
Pull Requests Count855
Pull Requests Open Count12
Pull Requests Close Count150
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

Yay

Yet Another Yogurt - An AUR Helper Written in Go

Packages

yay yay-bin yay-git GitHub license

Objectives

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 is based on the design of yaourt, apacman and pacaur. It is developed with these objectives in mind:

  • Provide an interface for pacman
  • Yaourt-style interactive search/install
  • Minimal dependencies
  • Minimize user input
  • Know when git packages are due for upgrades

Features

  • Perform advanced dependency solving
  • Download PKGBUILDs from ABS or AUR
  • Tab-complete the AUR
  • Query user up-front for all input (prior to starting builds)
  • Narrow search terms (yay linux header will first search linux and then narrow on header)
  • Find matching package providers during search and allow selection
  • Remove make dependencies at the end of the build process
  • Run without sourcing PKGBUILD

Installation

If you are migrating from another AUR helper, you can simply install Yay with that helper.

Alternatively, 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

Support

All support related to Yay should be requested via GitHub issues. Since Yay is not
officially supported by Arch Linux, support should not be sought out on the
forums, AUR comments or other official channels.

A broken AUR package should be reported as a comment on the package's AUR page.
A package may only be considered broken if it fails to build with makepkg.
Reports should be made using makepkg and include the full output as well as any
other relevant information. Never make reports using Yay or any other external
tools.

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
(see issue #123).

Yay is not prompting to skip packages during system upgrade.

The default behavior was changed after
v8.918
(see 3bdb534
and issue #554).
To restore the package-skip behavior use --combinedupgrade (make
it permanent by appending --save). Note: skipping packages will leave your
system in a
partially-upgraded state.

Sometimes diffs are printed to the terminal, and other times they are paged via less. How do I fix this?

Yay uses git diff to display diffs, which by default tells less not to
page if the output can fit into one terminal length. This behavior can be
overridden by exporting your own flags (export LESS=SRX).

Yay is not asking me to edit PKGBUILDS, and I don't like the diff menu! What can I do?

yay --editmenu --nodiffmenu --save

How can I tell Yay to act only on AUR packages, or only on repo packages?

yay -{OPERATION} --aur
yay -{OPERATION} --repo

An Out Of Date AUR Packages message is displayed. Why doesn't Yay update them?

This message does not mean that updated AUR packages are available. It means
the packages have been flagged out of date on the AUR, but
their maintainers have not yet updated the PKGBUILDs
(see outdated AUR packages).

Yay doesn't install dependencies added to a PKGBUILD during installation.

Yay resolves all dependencies ahead of time. You are free to edit the
PKGBUILD in any way, but any problems you cause are your own and should not be
reported unless they can be reproduced with the original PKGBUILD.

I know my -git package has updates but yay doesn't offer to update it

Yay uses an hash cache for development packages. Normally it is updated at the end of the package install with the message Found git repo.
If you transition between aur helpers and did not install the devel package using yay at some point, it is possible it never got added to the cache. yay -Y --gendb will fix the current version of every devel package and start checking from there.

I want to help out!

Check CONTRIBUTING.md for more information.

Examples of Custom Operations

To the top