Jguer / yay

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

yay does not re-evaluate dependencies after PKGBUILD edited #1757

Closed SwooshyCueb closed 1 year ago

SwooshyCueb commented 2 years ago

Affected Version

yay v11.1.2 - libalpm v13.0.1

Describe the bug

yay does not re-evaluate dependencies after PKGBUILD is edited. Changing an entry in depends when prompted to edit PKGBUILD has no effect.

Reproduction Steps

  1. Install mandoc. You may have to replace man-db.
  2. Try to install aur/git-buildpackage
  3. When prompted, edit the PKGBUILD. In depends, replace man-db with man.
  4. Observe that yay still tries to install man-db even though mandoc satisfies the man requirement.

Expected behavior

yay re-evaluates dependencies after PKGBUILD edited, and does not try to install man-db, as mandoc satisfies the man requirement.

Output

swooshy@bigboy ~/devstuff> yay -s git-buildpackage
1 aur/git-buildpackage 0.9.25-1 (+5 0.05) 
    Tools from Debian to integrate the package build system with Git
==> Packages to install (eg: 1 2 3, 1-3 or ^4)
==> 1
:: Checking for conflicts...
:: Checking for inner conflicts...
 -> Package conflicts found:
 -> Installing man-db will remove: mandoc (man)
 -> Conflicting packages will have to be confirmed manually
[Repo:2]  man-db-2.10.2-1  rpm-tools-4.17.0-3
[Repo Make:2]  python-mock-3.0.5-9  python-nosexcover-1.0.11-7
[Aur:1]  git-buildpackage-0.9.25-1

  1 git-buildpackage                 (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> NotInstalled
:: Deleting (1/1): /home/swooshy/.cache/yay/git-buildpackage
:: (1/1) Downloaded PKGBUILD: git-buildpackage
  1 git-buildpackage                 (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
:: (1/1) Parsing SRCINFO: git-buildpackage
  1 git-buildpackage                 (Build Files Exist)
==> PKGBUILDs to edit?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 1

 -> $EDITOR is not set
 -> Add $EDITOR or $VISUAL to your environment variables
==> Edit PKGBUILD with?
==> nano

==> Proceed with install? [Y/n] 

Download Results:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
113fa7|OK  |       0B/s|/var/cache/pacman/pkg/man-db-2.10.2-1-x86_64.pkg.tar.zst
60f042|OK  |       0B/s|/var/cache/pacman/pkg/python-mock-3.0.5-9-any.pkg.tar.zst
d87081|OK  |       0B/s|/var/cache/pacman/pkg/python-nosexcover-1.0.11-7-any.pkg.tar.zst
3e2eb4|OK  |       0B/s|/var/cache/pacman/pkg/rpm-tools-4.17.0-3-x86_64.pkg.tar.zst

Status Legend:
(OK):download completed.
resolving dependencies...
looking for conflicting packages...
:: man-db and mandoc are in conflict (man). Remove mandoc? [y/N] 
error: unresolvable package conflicts detected
error: failed to prepare transaction (conflicting dependencies)
:: man-db and mandoc are in conflict
 -> error installing repo packages
swooshy@bigboy ~/devstuff> yay -Pg
{
        "aururl": "https://aur.archlinux.org",
        "buildDir": "/home/swooshy/.cache/yay",
        "editor": "",
        "editorflags": "",
        "makepkgbin": "makepkg",
        "makepkgconf": "",
        "pacmanbin": "powerpill",
        "pacmanconf": "/etc/pacman.conf",
        "redownload": "no",
        "rebuild": "no",
        "answerclean": "NotInstalled",
        "answerdiff": "",
        "answeredit": "",
        "answerupgrade": "",
        "gitbin": "git",
        "gpgbin": "gpg",
        "gpgflags": "",
        "mflags": "",
        "sortby": "name",
        "searchby": "name-desc",
        "gitflags": "",
        "removemake": "no",
        "sudobin": "sudo",
        "sudoflags": "",
        "requestsplitn": 150,
        "completionrefreshtime": 7,
        "bottomup": true,
        "sudoloop": true,
        "timeupdate": false,
        "devel": true,
        "cleanAfter": false,
        "provides": true,
        "pgpfetch": true,
        "upgrademenu": true,
        "cleanmenu": true,
        "diffmenu": true,
        "editmenu": true,
        "combinedupgrade": false,
        "useask": false,
        "batchinstall": false,
        "singlelineresults": false,
        "version": "11.1.2"
}
Jguer commented 1 year ago

yay -Bi in yay-git can handle PKBUILD changes.

This is not on the roadmap for yay -S

dbasgoeze commented 1 year ago

How can that not be a bug? I as a user expect the tool to build and install the PKBUILD as modified. Why else would you be prompted to modify it in the first place?

Right now if you change (and therefore fix) the dependencies you could get a broken build...