paru
paru copied to clipboard
BatchInstall does not work
Affected Version
1.8.2
Description
Its hard to tell exactly the order of things because there is so much output, but after putting BatchInstall in my /etc/paru.conf and my ~/.config/paru/paru.conf I can confirm that it is downloading, compiling, and installing each package one at a time. When using yay I found that the batch install option was very important after installing some packages with many dependencies, if one of the compilations failed then you would not have a bunch of stray packages that aren't considered orphans. For reference a yay batch install looks like this: https://pastebin.com/WLBy90KZ
Output
Installing 3 small packages
:: Packages to install (eg: 1 2 3, 1-3):
:: 2 3 6
:: Resolving dependencies...
:: Calculating conflicts...
:: Calculating inner conflicts...
Repo (2) python-greenlet-1.1.2-1 python-pynvim-0.4.3-1
Aur (3) nvim-ghost-git-v0.1.1.r5.g052df0c-1 nvim-pygtk3-git-r41.ff7b7c1-1 nvim-r-0.9.16-1
:: Proceed with installation? [Y/n]:
:: Downloading PKGBUILDs...
PKGBUILDs up to date
resolving dependencies...
looking for conflicting packages...
Package (2) New Version Net Change
community/python-greenlet 1.1.2-1 0.39 MiB
community/python-pynvim 0.4.3-1 0.31 MiB
Total Installed Size: 0.71 MiB
:: Proceed with installation? [Y/n]
(2/2) checking keys in keyring [----------------------------------------] 100%
(2/2) checking package integrity [----------------------------------------] 100%
(2/2) loading package files [----------------------------------------] 100%
(2/2) checking for file conflicts [----------------------------------------] 100%
(2/2) checking available disk space [----------------------------------------] 100%
:: Running pre-transaction hooks...
(1/1) Checking Arch News with Informant ...
There are no unread news items
:: Processing package changes...
(1/2) installing python-greenlet [----------------------------------------] 100%
(2/2) installing python-pynvim [----------------------------------------] 100%
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) arch-audit.hook
(3/3) Searching for orphaned packages...
==> no orphans found.
fetching devel info...
==> Making package: nvim-ghost-git v0.1.1.r5.g052df0c-1 (Tue 26 Oct 2021 12:46:06 PM CDT)
==> Retrieving sources...
-> Updating nvim-ghost.nvim git repo...
Fetching origin
==> Validating source files with sha512sums...
nvim-ghost.nvim ... Skipped
==> Making package: nvim-ghost-git v0.1.1.r5.g052df0c-1 (Tue 26 Oct 2021 12:46:08 PM CDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Updating nvim-ghost.nvim git repo...
Fetching origin
==> Validating source files with sha512sums...
nvim-ghost.nvim ... Skipped
==> Removing existing $srcdir/ directory...
==> Extracting sources...
-> Creating working copy of nvim-ghost.nvim git repo...
Cloning into 'nvim-ghost.nvim'...
done.
==> Starting pkgver()...
==> Sources are ready.
nvim-ghost-git-v0.1.1.r5.g052df0c-1: parsing pkg list...
:: nvim-ghost-git-v0.1.1.r5.g052df0c-1 is up to date -- skipping build
loading packages...
resolving dependencies...
looking for conflicting packages...
Package (1) New Version Net Change
nvim-ghost-git v0.1.1.r5.g052df0c-1 16.95 MiB
Total Installed Size: 16.95 MiB
:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring [----------------------------------------] 100%
(1/1) checking package integrity [----------------------------------------] 100%
(1/1) loading package files [----------------------------------------] 100%
(1/1) checking for file conflicts [----------------------------------------] 100%
(1/1) checking available disk space [----------------------------------------] 100%
:: Running pre-transaction hooks...
(1/1) Checking Arch News with Informant ...
There are no unread news items
:: Processing package changes...
(1/1) installing nvim-ghost-git [----------------------------------------] 100%
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) arch-audit.hook
(3/3) Searching for orphaned packages...
==> no orphans found.
==> Making package: nvim-pygtk3-git r64.212d911-1 (Tue 26 Oct 2021 12:46:13 PM CDT)
==> Retrieving sources...
-> Updating nvim-pygtk3-git git repo...
Fetching origin
==> Validating source files with md5sums...
nvim-pygtk3-git ... Skipped
==> Making package: nvim-pygtk3-git r64.212d911-1 (Tue 26 Oct 2021 12:46:15 PM CDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Updating nvim-pygtk3-git git repo...
Fetching origin
==> Validating source files with md5sums...
nvim-pygtk3-git ... Skipped
==> Removing existing $srcdir/ directory...
==> Extracting sources...
-> Creating working copy of nvim-pygtk3-git git repo...
Cloning into 'nvim-pygtk3-git'...
done.
==> Starting pkgver()...
==> Sources are ready.
nvim-pygtk3-git-r41.ff7b7c1-1: parsing pkg list...
:: nvim-pygtk3-git-r41.ff7b7c1-1 is up to date -- skipping build
==> Making package: nvim-r 0.9.16-1 (Tue 26 Oct 2021 12:46:19 PM CDT)
==> Retrieving sources...
-> Found nvim-r-0.9.16.tar.gz
==> Validating source files with sha256sums...
nvim-r-0.9.16.tar.gz ... Passed
==> Making package: nvim-r 0.9.16-1 (Tue 26 Oct 2021 12:46:20 PM CDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found nvim-r-0.9.16.tar.gz
==> Validating source files with sha256sums...
nvim-r-0.9.16.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
-> Extracting nvim-r-0.9.16.tar.gz with bsdtar
==> Sources are ready.
nvim-r-0.9.16-1: parsing pkg list...
:: nvim-r-0.9.16-1 is up to date -- skipping build
loading packages...
resolving dependencies...
looking for conflicting packages...
Package (2) New Version Net Change
nvim-pygtk3-git r64.212d911-1 0.05 MiB
nvim-r 0.9.16-1 0.62 MiB
Total Installed Size: 0.67 MiB
:: Proceed with installation? [Y/n]
(2/2) checking keys in keyring [----------------------------------------] 100%
(2/2) checking package integrity [----------------------------------------] 100%
(2/2) loading package files [----------------------------------------] 100%
(2/2) checking for file conflicts [----------------------------------------] 100%
(2/2) checking available disk space [----------------------------------------] 100%
:: Running pre-transaction hooks...
(1/1) Checking Arch News with Informant ...
There are no unread news items
:: Processing package changes...
(1/2) installing nvim-pygtk3-git [----------------------------------------] 100%
(2/2) installing nvim-r [----------------------------------------] 100%
Optional dependencies for nvim-r
vim>=8.1.1705: either vim or neovim
tmux>=2.0: if using vim and running R in an external terminal emulator, necessary for sending commands to R
[installed]
neovim>=0.4.3: either neovim or vim [installed]
r>=3.0.0: for integration with R
pandoc: render output from markup files
vim-csv: inspect data.frames and matrices
:: Running post-transaction hooks...
(1/5) Arming ConditionNeedsUpdate...
(2/5) arch-audit.hook
(3/5) Updating icon theme caches...
(4/5) Searching for orphaned packages...
==> no orphans found.
(5/5) Updating the desktop file MIME type cache...
paru.conf
#
# $PARU_CONF
# /etc/paru.conf
# ~/.config/paru/paru.conf
#
# See the paru.conf(5) manpage for options
#
# GENERAL OPTIONS
#
[options]
PgpFetch
Devel
Provides
DevelSuffixes = -git -cvs -svn -bzr -darcs -always
#AurOnly
BottomUp
RemoveMake = yes
SkipReview
BatchInstall
#SudoLoop
#UseAsk
#CombinedUpgrade
#CleanAfter
#UpgradeMenu
#NewsOnUpgrade
#LocalRepo
#Chroot
#Sign
#SignDb
#
# Binary OPTIONS
#
#[bin]
#FileManager = vifm
#MFlags = --skippgpcheck
#Sudo = doas
The issue seems to be due to how we abuse libalpm by keeping a handle while also using pacman to modify the system. You say yay works but I believe it would fail in the exact same way if you didn't have those 2 repo depends installed already.
So is this something that can be fixed on my end? I'm not really following you. You're saying it fails because it has to download dependencies first?
So the batch install logic is pretty trivial.
For each package built we add it to the install queue. If the package we are about to build does not have its deps met we install everything in the queue assuming the dep resolver resolved it right and it is in there.
Internally we query alpm to check if a package is installed. But externally we run pacman to install stuff. Seems as alpm does not expect the system to change out from under it, it returns false on if the dep is installed even though it just was. This then causes the install queue to flush.
Issue is that one of the deps is pulled in as a provider and not a literal package name. libalpm will notice a new dep installed if we search for it by exact name but not if we're trying to find a provider.
Issue is that one of the deps is pulled in as a provider and not a literal package name. libalpm will notice a new dep installed if we search for it by exact name but not if we're trying to find a provider.
I'm not acutally sure if this is correct but in this case the dep it's looking for is a virtual package.
Could this be related?
$ paru --batchinstall -S zfs-utils zfs-dkms
...
loading packages...
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: installing zfs-utils (2.1.2-1) breaks dependency 'zfs-utils=2.1.1' required by zfs-dkms
loading packages...
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: installing zfs-utils (2.1.2-1) breaks dependency 'zfs-utils=2.1.1' required by zfs-dkms
error: packages failed to build: zfs-dkms-2.1.2-1
Or do I have the wrong idea about batchinstall?
The issue seems to be due to how we abuse libalpm by keeping a handle while also using pacman to modify the system. You say yay works but I believe it would fail in the exact same way if you didn't have those 2 repo depends installed already.
This was actually fixed a while ago.
The other is kind of separate, it may be fixed now by happenstance but I'm not 100%
Assuming this is all fixed in master. If not open a new issue.
Also there's now --chroot which you can think of as a better version of --batchinstall.
I actually barely used paru again since this a couple days ago since you mentioned it should be fixed. I didn't use it a lot, but I think it is fixed. I did have one failed build too with a lot of dependencies and it removed everything afterwards, so that was good.
First time I have used paru and found it an improvement over yay, I was very pleased with it... My only gripe was the default top down sorting lol, I don't understand it. Anyway, great work, it's really coming along.
I'll have to look into chroot and read the documentation