1
0
mirror of https://github.com/Jguer/yay synced 2024-07-01 07:56:37 +00:00

Compare commits

...

3 Commits

Author SHA1 Message Date
iTrooz
f9491cd9d1
Merge a77d98824d into 5149e3714d 2024-06-21 17:29:42 -07:00
Jo
5149e3714d
fix(query): match empty pacman -Si with AUR info (#2459) 2024-06-21 10:06:02 +02:00
Marcus B Spencer
9ed9b0b4e1
Update README.md (#2458)
Update the README to prevent partial upgrades.

Partial upgrades are dangerous on Arch Linux.
Partial upgrades may occur when a `-y` operation is given without a corresponding `-u` operation.

Quote from the ArchWiki:
> Do not use:
> `pacman -Sy package`
> `pacman -Sy` followed by `pacman -S` package (Note the absence of `-S**u**` in the installation of the package.)
> `pacman -Syuw` (Note that `pacman -Syuw` does imply the same risks like pacman -Sy`, as it will update the pacman sync database without installing the newer packages.)

https://wiki.archlinux.org/title/System_maintenance#Partial_upgrades_are_unsupported
2024-06-20 14:15:14 +02:00
2 changed files with 7 additions and 3 deletions

View File

@ -35,10 +35,10 @@ If you are migrating from another AUR helper, you can simply install Yay with th
The initial installation of Yay can be done by cloning the PKGBUILD and
building with makepkg:
We start with updating the package lists and make sure we have the `base-devel` package group installed.
We make sure we have the `base-devel` package group installed.
```sh
pacman -Sy --needed git base-devel
pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si

View File

@ -45,6 +45,10 @@ func syncInfo(ctx context.Context, run *runtime.Runtime,
pkgS = query.RemoveInvalidTargets(run.Logger, pkgS, run.Cfg.Mode)
aurS, repoS := packageSlices(pkgS, run.Cfg, dbExecutor)
if len(repoS) == 0 && len(aurS) == 0 {
aurS = dbExecutor.InstalledRemotePackageNames()
}
if len(aurS) != 0 {
noDB := make([]string, 0, len(aurS))
@ -64,7 +68,7 @@ func syncInfo(ctx context.Context, run *runtime.Runtime,
}
}
if len(repoS) != 0 {
if len(repoS) != 0 || (len(aurS) == 0 && len(repoS) == 0) {
arguments := cmdArgs.Copy()
arguments.ClearTargets()
arguments.AddTarget(repoS...)