pikaur
pikaur copied to clipboard
Pikaur unnecessarily removes dependencies during AUR build
Pikaur v1.14.5
Pacman v6.0.2 - libalpm v13.0.2 - pyalpm v0.10.6
Pikaur does the "Removing already installed dependencies" step on the 'depends' as well as the 'makedepends', which is redundant as they are then reinstalled moments later when the built package is installed.
Everything still works of course, but fixing it would improve behaviour with slow hard drives or long pacman hooks. 🙇
Recent example of mine:
:: AUR package will be installed:
polymc-bin -> 1.4.3-1
:: Proceed with installation? [Y/n]
:: [v]iew package details [m]anually select packages
>>
looking for conflicting AUR packages...
:: warning: Not showing diff for polymc-bin package (installing for the first time)
Do you want to edit PKGBUILD for polymc-bin package? [Y/n]
Reading local package database...
resolving dependencies...
looking for conflicting packages...
Packages (22) double-conversion-3.2.1-1 freeglut-3.4.0-1 jasper-3.0.6-1 java-runtime-common-3-3
jre-openjdk-headless-19.0.1.u10-3 libb2-0.98.1-2 libmng-2.0.3-3 libnet-1:1.1.6-1 md4c-0.4.8-1
qt6-translations-6.4.1-1 tslib-1.22-1 vulkan-headers-1:1.3.235-1 xcb-util-cursor-0.1.4-1
xcb-util-image-0.4.1-2 xcb-util-keysyms-0.4.1-4 xcb-util-renderutil-0.3.10-1 xcb-util-wm-0.4.2-1
jre-openjdk-19.0.1.u10-3 qt6-5compat-6.4.1-1 qt6-base-6.4.1-1 qt6-imageformats-6.4.1-1 qt6-svg-6.4.1-1
Total Download Size: 55.34 MiB
Total Installed Size: 270.95 MiB
:: Proceed with installation? [Y/n] Y
:: Retrieving packages...
jre-openjdk-headless-19.0.1.u10-3-x86_64 38.1 MiB 3.42 MiB/s 00:11 [##########################################] 100%
--snip--
:: Starting the build:
--snip--
:: Removing already installed dependencies for polymc-bin:
checking dependencies...
:: libbluray optionally requires java-runtime: BD-J library
:: libjpeg-turbo optionally requires java-runtime>11: for TurboJPEG Java wrapper
:: libtiff optionally requires freeglut: for using tiffgt
:: libwebp optionally requires freeglut: vwebp viewer
Packages (22) double-conversion-3.2.1-1 freeglut-3.4.0-1 jasper-3.0.6-1 java-runtime-common-3-3 jre-openjdk-19.0.1.u10-3
jre-openjdk-headless-19.0.1.u10-3 libb2-0.98.1-2 libmng-2.0.3-3 libnet-1:1.1.6-1 md4c-0.4.8-1
qt6-5compat-6.4.1-1 qt6-base-6.4.1-1 qt6-imageformats-6.4.1-1 qt6-svg-6.4.1-1 qt6-translations-6.4.1-1
tslib-1.22-1 vulkan-headers-1:1.3.235-1 xcb-util-cursor-0.1.4-1 xcb-util-image-0.4.1-2
xcb-util-keysyms-0.4.1-4 xcb-util-renderutil-0.3.10-1 xcb-util-wm-0.4.2-1
Total Removed Size: 270.95 MiB
:: Do you want to remove these packages? [Y/n] Y
:: Processing package changes...
( 1/22) removing jre-openjdk [##########################################] 100%
--snip--
loading packages...
resolving dependencies...
looking for conflicting packages...
Packages (23) double-conversion-3.2.1-1 freeglut-3.4.0-1 jasper-3.0.6-1 java-runtime-common-3-3 jre-openjdk-19.0.1.u10-3
jre-openjdk-headless-19.0.1.u10-3 libb2-0.98.1-2 libmng-2.0.3-3 libnet-1:1.1.6-1 md4c-0.4.8-1
qt6-5compat-6.4.1-1 qt6-base-6.4.1-1 qt6-imageformats-6.4.1-1 qt6-svg-6.4.1-1 qt6-translations-6.4.1-1
tslib-1.22-1 vulkan-headers-1:1.3.235-1 xcb-util-cursor-0.1.4-1 xcb-util-image-0.4.1-2
xcb-util-keysyms-0.4.1-4 xcb-util-renderutil-0.3.10-1 xcb-util-wm-0.4.2-1 polymc-bin-1.4.3-1
Total Installed Size: 277.72 MiB
:: Proceed with installation? [Y/n] Y
(23/23) checking keys in keyring [##########################################] 100%
(22/23) checking package integrity [##########################################] 100%
(22/23) loading package files [##########################################] 100%
(23/23) checking for file conflicts [##########################################] 100%
(23/23) checking available disk space [##########################################] 100%
:: Processing package changes...
( 1/23) installing java-runtime-common [##########################################] 100%
--snip--
feel free to implement such behavior as optional, but not default
why's that?
pkgs could have conflicting build dependencies
ah, so in this case you'd want each individual build to succeed, after removing deps each time, even though a complete install of them would fail?
if pikaur knows how many are being made perhaps we could do this by default in the N=1 case?
you can try implementing that, but it's also lots of smaller caveats there aside from that, so unlikely it will be ever enabled by default in the config
I may be confused, but is this not the use case KeepBuildDeps is meant to handle?
(per the discussion in 254)
No, not exactly, assuming the docs are correct. This is about keeping runtime dependencies installed, not build deps. The issue is that pikaur is (at time of reporting) removing runtime deps along with build deps. AFAIK it doesn't need to remove them, even with KeepBuildDeps off.
(Btw, I think the case of clashing build deps shouldn't be a blocker on this, because it's not really about build deps. And if the runtime deps of what you're trying to install clash, then the overall operation is going to fail anyway.)
I think this is still a valid enhancement and should be left open
The issue is that pikaur is (at time of reporting) removing runtime deps along with build deps.
could you double-check that with the latest pikaur-git?
the option should apply for both make- and runtime deps