Jguer / yay

Yet another Yogurt - An AUR Helper written in Go
GNU General Public License v3.0
10.98k stars 359 forks source link

newengine shows make dependencies of the AUR package to update in the update list #1932

Open Porkepix opened 1 year ago

Porkepix commented 1 year ago

Affected Version

yay v11.3.1.r116.g4e0a5c8 - libalpm v13.0.2

Describe the bug

Without the newengine, update diff on yay -Syu only shows diff of currently installed packages, not of the to-be-installed make dependencies for AUR packages updates that might end-up uninstalled right after.

Reproduction Steps

  1. Have an AUR package to upgrade with make dependencies missing from the system
  2. Run yay -Syu
  3. See the versions diff that's given, also compared to previous engine, the question of whether those make dependencies should be removed afterwards or not seems to comes later.

Expected behavior

The previous behavior of not showing make dependencies in the diff seemed to be better. The question of whether to uninstall those make dependencies or not afterwards seemed to come later in the process, too.

While we're at the difference in output, the new engine also seems to be more verbose right after the choice of the packages to exclude. But also to don't show anymore warning about skipped packages.

Output

$ yay -Syu
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Searching AUR for updates...
:: Checking development packages...
:: Searching databases for updates...
:: 14 Packages to upgrade.
14  core/curl               7.88.1-2              -> 7.88.1-3
13  extra/babl              0.1.98-1              -> 0.1.100-1
12  extra/cmake                                   -> 3.25.2-1
11  extra/gegl              0.4.40-4              -> 0.4.42-1
10  extra/gimp              2.10.32-3             -> 2.10.34-1
 9  extra/thunar            4.18.3-1              -> 4.18.4-1
 8  extra/vala                                    -> 0.56.4-1
 7  community/gajim         1.2.2-2               -> 1.6.1-1
 6  community/ninja                               -> 1.11.1-2
 5  multilib/lib32-curl     7.88.1-3              -> 7.88.1-4
 4  aur/gajim-plugin-omemo  2.6.80-3              -> 2.9.0-1
 3  aur/thinkfan-ui         0.9.1-1               -> 0.9.1-2
 2  aur/tor-browser         11.0.2-1              -> 12.0.3-1
 1  devel/dino-git          v0.4.0.r6.g9bf30409-1 -> latest-commit
==> Packages to exclude: (eg: "1 2 3", "1-3", "^4" or repo name)
 -> May cause partial upgrades and break systems
==> 2 4 7
AUR Explicit (2): thinkfan-ui-0.9.1-2, dino-git-latest-commit
Sync Dependency (4): babl-0.1.100-1, gegl-0.4.42-1, lib32-curl-7.88.1-4, curl-7.88.1-3
Sync Explicit (2): gimp-2.10.34-1, thunar-4.18.4-1
Sync Make Dependency (3): vala-0.56.4-1, ninja-1.11.1-2, cmake-3.25.2-1
:: PKGBUILD up to date, skipping download: dino-git
:: PKGBUILD up to date, skipping download: thinkfan-ui
==> Making package: thinkfan-ui 0.9.1-2 (jeu. 23 févr. 2023 01:45:57)
==> Retrieving sources...
  -> Updating thinkfan-ui git repo...
==> Validating source files with sha256sums...
    thinkfan-ui ... Skipped
==> Making package: dino-git v0.4.0.r0.g5568bbc6-1 (jeu. 23 févr. 2023 01:45:58)
==> Retrieving sources...
  -> Updating dino git repo...
==> Validating source files with sha512sums...
    dino ... Skipped
  2 dino-git                         (Build Files Exist)
  1 thinkfan-ui                      (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
  2 dino-git                         (Build Files Exist)
  1 thinkfan-ui                      (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
:: Remove make dependencies after install? [y/N]

EDIT: If testing this new engine and in case of a need to compare output and so on, is there a quick toggle between engines on the command-line? Json wouldn't even allow for comment in the config file.

Jguer commented 1 year ago

In the old engine yay would install those packages nonetheless but not properly warn you about it.

Maybe 14 Packages to upgrade. -> 14 Packages to install/upgrade.

And adding a small justification to the right?

8 extra/vala -> 0.56.4-1 -> 8 extra/vala -> 0.56.4-1 (MakeDep, required by dino-git)

These changes will be easier to do once the old engine is removed

Off-topic: I can add a flag for toggling the new engine from the cmd args, at least temporarily

Porkepix commented 1 year ago

Well, To me it was making more sense to don't show them, especially if getting rid of them once makepkg is done with it. This might also be configurable, but this would raise the question of the default value.

This looks particularly strange to show them with empty values in one column considering this should be an "upgrade" summary. Those packages are not upgrade.

Though, that makes me wonder if it would also show new dependencies. I had no situation where it would be the case for now, but iirc if a package had new dependencies it wasn't shown by yay but only on the install confirmation request passed through yay by pacman.