Jguer / yay

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

error: could not set install reason for package <group name> (could not find or read package) #2137

Closed Zebradil closed 1 year ago

Zebradil commented 1 year ago

Affected Version

yay v12.0.4.r7.g8c69356 - libalpm v13.0.2

Describe the bug

Installation of a group (yay -S xorg) fails with the following error:

error: could not set install reason for package xorg (could not find or read package)
 -> error installing repo packages

Reproduction Steps

# Spin up a docker container
docker run -it archlinux:base-devel

# Inside the container, install yay-git
useradd yay-test -m
echo 'yay-test ALL=(ALL:ALL) NOPASSWD: ALL' >> /etc/sudoers.d/yay-test
su yay-test
cd
sudo pacman -Sy
sudo pacman -S --noconfirm git
git clone https://aur.archlinux.org/yay-git.git
cd yay-git
makepkg -si --noconfirm

# Try to install xorg
pacman -Q | grep --count xorg # check that nothing is there, prints 0
yay -S --noconfirm --needed xorg # install the packages from the group but exits with error
pacman -Q | grep --count xorg # check that packages were actually installed, prints 51

Expected behavior

yay -S --noconfirm --needed xorg finishes with 0 exit code.

Output

Output of `yay -S --noconfirm --needed xorg` ```text yay -S --noconfirm --needed xorg Sync Explicit (1): xorg :: There are 48 members in group xorg: :: Repository extra 1) xf86-video-vesa 2) xorg-bdftopcf 3) xorg-docs 4) xorg-font-util 5) xorg-fonts-100dpi 6) xorg-fonts-75dpi 7) xorg-fonts-encodings 8) xorg-iceauth 9) xorg-mkfontscale 10) xorg-server 11) xorg-server-common 12) xorg-server-devel 13) xorg-server-xephyr 14) xorg-server-xnest 15) xorg-server-xvfb 16) xorg-sessreg 17) xorg-setxkbmap 18) xorg-smproxy 19) xorg-x11perf 20) xorg-xauth 21) xorg-xbacklight 22) xorg-xcmsdb 23) xorg-xcursorgen 24) xorg-xdpyinfo 25) xorg-xdriinfo 26) xorg-xev 27) xorg-xgamma 28) xorg-xhost 29) xorg-xinput 30) xorg-xkbcomp 31) xorg-xkbevd 32) xorg-xkbutils 33) xorg-xkill 34) xorg-xlsatoms 35) xorg-xlsclients 36) xorg-xmodmap 37) xorg-xpr 38) xorg-xprop 39) xorg-xrandr 40) xorg-xrdb 41) xorg-xrefresh 42) xorg-xset 43) xorg-xsetroot 44) xorg-xvinfo 45) xorg-xwayland 46) xorg-xwd 47) xorg-xwininfo 48) xorg-xwud Enter a selection (default=all): resolving dependencies... :: There are 2 providers available for man: :: Repository core 1) man-db :: Repository community 2) mandoc Enter a number (default=1): looking for conflicting packages... warning: dependency cycle detected: warning: harfbuzz will be installed before its freetype2 dependency warning: dependency cycle detected: warning: mesa will be installed before its libglvnd dependency Package (114) New Version Net Change extra/default-cursors 2-1 0.00 MiB extra/fontconfig 2:2.14.2-1 1.09 MiB extra/freetype2 2.13.0-1 1.68 MiB extra/graphite 1:1.3.14-3 0.20 MiB extra/harfbuzz 7.1.0-1 3.67 MiB extra/libdrm 2.4.115-1 1.18 MiB core/libedit 20221030_3.1-1 0.28 MiB extra/libepoxy 1.5.10-1 2.79 MiB extra/libevdev 1.13.0-1 0.25 MiB extra/libfontenc 1.1.7-1 0.04 MiB extra/libglvnd 1.6.0-1 3.70 MiB extra/libgudev 237-2 0.39 MiB extra/libice 1.1.1-2 0.36 MiB extra/libinput 1.23.0-1 1.08 MiB extra/libomxil-bellagio 0.9.3-4 0.58 MiB extra/libpciaccess 0.17-1 0.06 MiB core/libpipeline 1.5.7-1 0.07 MiB extra/libpng 1.6.39-1 0.57 MiB extra/libsm 1.2.4-1 0.26 MiB extra/libunwind 1.6.2-2 0.25 MiB extra/libwacom 2.6.0-2 0.68 MiB extra/libx11 1.8.4-1 10.01 MiB extra/libxau 1.0.11-2 0.02 MiB extra/libxaw 1.0.15-1 1.69 MiB extra/libxcb 1.15-2 3.78 MiB extra/libxcomposite 0.4.6-1 0.02 MiB extra/libxcursor 1.2.1-3 0.06 MiB extra/libxcvt 0.1.2-1 0.03 MiB extra/libxdamage 1.1.6-1 0.02 MiB extra/libxdmcp 1.1.4-2 0.13 MiB extra/libxext 1.3.5-1 0.30 MiB extra/libxfixes 6.0.1-1 0.04 MiB extra/libxfont2 2.0.6-2 0.23 MiB extra/libxft 2.3.8-1 0.13 MiB extra/libxi 1.8-3 0.48 MiB extra/libxinerama 1.1.5-1 0.02 MiB extra/libxkbfile 1.1.2-1 0.19 MiB extra/libxmu 1.1.4-1 0.33 MiB extra/libxpm 3.5.16-1 0.16 MiB extra/libxrandr 1.5.3-1 0.07 MiB extra/libxrender 0.9.11-1 0.10 MiB extra/libxshmfence 1.3.2-1 0.02 MiB extra/libxt 1.3.0-1 2.04 MiB extra/libxtst 1.2.4-1 0.11 MiB extra/libxv 1.0.12-1 0.06 MiB extra/libxxf86vm 1.1.5-1 0.03 MiB extra/llvm-libs 15.0.7-2 120.48 MiB extra/lm_sensors 1:3.6.0.r41.g31d1f125-2 0.47 MiB core/man-db 2.11.2-1 2.27 MiB extra/mesa 23.0.3-1 85.32 MiB extra/mtdev 1.1.6-2 0.05 MiB extra/pixman 0.42.2-1 0.72 MiB extra/vulkan-icd-loader 1.3.245-1 0.47 MiB extra/wayland 1.22.0-1 0.78 MiB extra/xcb-proto 1.15.2-2 0.88 MiB extra/xcb-util 0.4.1-1 0.04 MiB extra/xcb-util-image 0.4.1-2 0.05 MiB extra/xcb-util-keysyms 0.4.1-4 0.02 MiB extra/xcb-util-renderutil 0.3.10-1 0.03 MiB extra/xcb-util-wm 0.4.2-1 0.21 MiB extra/xf86-input-libinput 1.3.0-1 0.10 MiB extra/xkeyboard-config 2.38-1 6.52 MiB extra/xorg-fonts-alias-100dpi 1.0.5-1 0.00 MiB extra/xorg-fonts-alias-75dpi 1.0.5-1 0.00 MiB extra/xorg-util-macros 1.20.0-2 0.09 MiB extra/xorgproto 2022.2-1 1.43 MiB extra/xf86-video-vesa 2.6.0-1 0.03 MiB extra/xorg-bdftopcf 1.1.1-1 0.04 MiB extra/xorg-docs 1.7.2-2 0.82 MiB extra/xorg-font-util 1.4.0-1 0.23 MiB extra/xorg-fonts-100dpi 1.0.4-2 12.18 MiB extra/xorg-fonts-75dpi 1.0.4-1 10.64 MiB extra/xorg-fonts-encodings 1.0.7-1 0.61 MiB extra/xorg-iceauth 1.0.9-1 0.04 MiB extra/xorg-mkfontscale 1.2.2-1 0.05 MiB extra/xorg-server 21.1.8-1 3.72 MiB extra/xorg-server-common 21.1.8-1 0.12 MiB extra/xorg-server-devel 21.1.8-1 1.20 MiB extra/xorg-server-xephyr 21.1.8-1 2.26 MiB extra/xorg-server-xnest 21.1.8-1 1.40 MiB extra/xorg-server-xvfb 21.1.8-1 1.91 MiB extra/xorg-sessreg 1.1.3-1 0.02 MiB extra/xorg-setxkbmap 1.3.3-2 0.03 MiB extra/xorg-smproxy 1.0.7-1 0.03 MiB extra/xorg-x11perf 1.6.2-1 0.23 MiB extra/xorg-xauth 1.1.2-1 0.05 MiB extra/xorg-xbacklight 1.2.3-3 0.02 MiB extra/xorg-xcmsdb 1.0.6-1 0.04 MiB extra/xorg-xcursorgen 1.0.8-1 0.02 MiB extra/xorg-xdpyinfo 1.3.3-4 0.04 MiB extra/xorg-xdriinfo 1.0.7-1 0.02 MiB extra/xorg-xev 1.2.5-1 0.03 MiB extra/xorg-xgamma 1.0.7-1 0.02 MiB extra/xorg-xhost 1.0.9-1 0.03 MiB extra/xorg-xinput 1.6.3-3 0.06 MiB extra/xorg-xkbcomp 1.4.6-1 0.21 MiB extra/xorg-xkbevd 1.1.5-1 0.04 MiB extra/xorg-xkbutils 1.0.5-1 0.06 MiB extra/xorg-xkill 1.0.6-1 0.02 MiB extra/xorg-xlsatoms 1.1.4-1 0.02 MiB extra/xorg-xlsclients 1.1.5-1 0.02 MiB extra/xorg-xmodmap 1.0.11-1 0.05 MiB extra/xorg-xpr 1.1.0-1 0.05 MiB extra/xorg-xprop 1.2.6-1 0.05 MiB extra/xorg-xrandr 1.5.2-1 0.07 MiB extra/xorg-xrdb 1.2.1-1 0.04 MiB extra/xorg-xrefresh 1.0.7-1 0.02 MiB extra/xorg-xset 1.2.5-1 0.04 MiB extra/xorg-xsetroot 1.1.3-1 0.02 MiB extra/xorg-xvinfo 1.1.5-1 0.02 MiB extra/xorg-xwayland 23.1.1-1 2.23 MiB extra/xorg-xwd 1.0.8-1 0.04 MiB extra/xorg-xwininfo 1.1.6-1 0.05 MiB extra/xorg-xwud 1.0.6-1 0.03 MiB Total Installed Size: 298.14 MiB :: Proceed with installation? [Y/n] checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing xf86-video-vesa... installing xorg-bdftopcf... installing libpipeline... installing man-db... Optional dependencies for man-db gzip [installed] installing xorg-docs... installing xorg-font-util... installing xorg-fonts-alias-100dpi... installing xorg-fonts-100dpi... installing xorg-fonts-alias-75dpi... installing xorg-fonts-75dpi... installing xorg-fonts-encodings... installing xorgproto... installing libice... installing xorg-iceauth... installing graphite... Optional dependencies for graphite graphite-docs: Documentation installing harfbuzz... Optional dependencies for harfbuzz harfbuzz-utils: utilities installing libpng... installing freetype2... installing libfontenc... installing xorg-mkfontscale... Creating X fontdir indices... done. installing libepoxy... installing libxfont2... installing pixman... installing xkeyboard-config... installing xcb-proto... installing libxdmcp... installing libxau... installing libxcb... installing libx11... installing libxkbfile... installing xorg-xkbcomp... installing libxext... installing libxrender... installing libxrandr... installing xorg-setxkbmap... installing xorg-server-common... installing libunwind... installing libpciaccess... installing libdrm... installing default-cursors... Optional dependencies for default-cursors adwaita-cursors: default cursor theme installing wayland... installing libxxf86vm... installing libxfixes... installing libxdamage... installing libxshmfence... installing libomxil-bellagio... installing libedit... installing llvm-libs... installing lm_sensors... Optional dependencies for lm_sensors rrdtool: for logging with sensord perl: for sensor detection and configuration convert [installed] installing vulkan-icd-loader... Optional dependencies for vulkan-icd-loader vulkan-driver: packaged vulkan driver installing mesa... Optional dependencies for mesa opengl-man-pages: for the OpenGL API man pages mesa-vdpau: for accelerated video playback libva-mesa-driver: for accelerated video playback installing libglvnd... installing mtdev... installing libevdev... installing libgudev... installing libwacom... Optional dependencies for libwacom python-libevdev: for libwacom-show-stylus python-pyudev: for libwacom-show-stylus installing libinput... Optional dependencies for libinput gtk4: libinput debug-gui python-pyudev: libinput measure python-libevdev: libinput measure installing xf86-input-libinput... installing libxcvt... installing xorg-server... >>> xorg-server has now the ability to run without root rights with the help of systemd-logind. xserver will fail to run if not launched from the same virtual terminal as was used to log in. Without root rights, log files will be in ~/.local/share/xorg/ directory. Old behavior can be restored through Xorg.wrap config file. See Xorg.wrap man page (man xorg.wrap). installing xorg-util-macros... installing xorg-server-devel... installing libxv... installing xcb-util... installing xcb-util-image... installing xcb-util-renderutil... installing xcb-util-wm... installing xcb-util-keysyms... installing xorg-server-xephyr... installing xorg-server-xnest... installing libsm... installing libxt... installing libxmu... installing xorg-xauth... installing xorg-server-xvfb... installing xorg-sessreg... installing xorg-smproxy... installing fontconfig... Creating fontconfig configuration... Rebuilding fontconfig cache... installing libxft... installing xorg-x11perf... installing xorg-xbacklight... installing xorg-xcmsdb... installing libxcursor... installing xorg-xcursorgen... installing libxi... installing libxtst... installing libxcomposite... installing libxinerama... installing xorg-xdpyinfo... installing xorg-xdriinfo... installing xorg-xev... installing xorg-xgamma... installing xorg-xhost... installing xorg-xrandr... installing xorg-xinput... installing xorg-xkbevd... installing libxpm... installing libxaw... installing xorg-xkbutils... installing xorg-xkill... installing xorg-xlsatoms... installing xorg-xlsclients... installing xorg-xmodmap... installing xorg-xpr... installing xorg-xprop... installing xorg-xrdb... Optional dependencies for xorg-xrdb gcc: for preprocessing [installed] mcpp: a lightweight alternative for preprocessing installing xorg-xrefresh... installing xorg-xset... installing xorg-xsetroot... installing xorg-xvinfo... installing xorg-xwayland... installing xorg-xwd... installing xorg-xwininfo... installing xorg-xwud... :: Running post-transaction hooks... (1/8) Reloading system manager configuration... Skipped: Current root is not booted. (2/8) Updating udev hardware database... (3/8) Creating temporary files... /usr/lib/tmpfiles.d/journal-nocow.conf:26: Failed to replace specifiers in '/var/log/journal/%m': No such file or directory /usr/lib/tmpfiles.d/systemd.conf:23: Failed to replace specifiers in '/run/log/journal/%m': No such file or directory /usr/lib/tmpfiles.d/systemd.conf:25: Failed to replace specifiers in '/run/log/journal/%m': No such file or directory /usr/lib/tmpfiles.d/systemd.conf:26: Failed to replace specifiers in '/run/log/journal/%m/*.journal*': No such file or directory /usr/lib/tmpfiles.d/systemd.conf:29: Failed to replace specifiers in '/var/log/journal/%m': No such file or directory /usr/lib/tmpfiles.d/systemd.conf:30: Failed to replace specifiers in '/var/log/journal/%m/system.journal': No such file or directory /usr/lib/tmpfiles.d/systemd.conf:32: Failed to replace specifiers in '/var/log/journal/%m': No such file or directory /usr/lib/tmpfiles.d/systemd.conf:33: Failed to replace specifiers in '/var/log/journal/%m/system.journal': No such file or directory (4/8) Reloading device manager configuration... Skipped: Device manager is not running. (5/8) Arming ConditionNeedsUpdate... (6/8) Updating fontconfig configuration... (7/8) Updating fontconfig cache... (8/8) Updating X fontdir indices... error: could not set install reason for package xorg (could not find or read package) -> error installing repo packages ```
Relevant output with the `--debug` flag ```text debug: loading package cache for repository 'local' debug: added 259 packages to package cache for db 'local' debug: returning error 33 from alpm_db_get_pkg (../lib/libalpm/db.c: 248) : could not find or read package error: could not set install reason for package xorg (could not find or read package) debug: unregistering database 'local' debug: freeing package cache for repository 'local' debug: unregistering database 'core' debug: unregistering database 'extra' debug: unregistering database 'community' -> error installing repo packages ```
Jguer commented 1 year ago

Thanks for opening up the issue, #2148 should fix this, can you try it on yay-git?

Zebradil commented 1 year ago

Works with yay-git. Awesome, thank you!