paru icon indicating copy to clipboard operation
paru copied to clipboard

If you want to update two packages that depend on specific versions of each other then none of them get updated.

Open treejadey opened this issue 3 years ago • 5 comments

Affected Version

paru v1.10.0 - libalpm v13.0.1

Description

Have you checked previous issues? Yes. I did check previous issues, but couldn't find anything of relevance.

So, I use ZFS on my system and I do not see any problems/reasons to switch to something else. I installed the zfs-dkms package on the AUR using paru, and everything has been going great. One problem, zfs-dkms depends on a specific version of the zfs-utils, and zfs-utils depend on a specific version of zfs-dkms, which completely prevents me from updating them.

Output

⋊> ~ paru                                                                                                                                23:29:18
:: Synchronizing package databases...
 kde-unstable is up to date
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Starting full system upgrade...
 there is nothing to do
:: Looking for AUR upgrades
:: Looking for devel upgrades
:: Resolving dependencies...
:: Calculating conflicts...
:: Calculating inner conflicts...

Aur (5) chatterino2-dankerino-git-r3693.0c3cafa4-1  zfs-utils-2.1.4-1  zfs-dkms-2.1.4-1  appimagelauncher-2.2.0-5  
    ttf-google-fonts-git-1:r2002.37e0f8a4-1

:: Proceed to review? [Y/n]: y

:: Downloading PKGBUILDs...
 PKGBUILDs up to date
 nothing new to review
fetching devel info...
==> Making package: chatterino2-dankerino-git r3693.0c3cafa4-1 (Fri Mar 25 23:30:13 2022)
==> Retrieving sources...
==> ERROR: /home/mykola/.cache/paru/clone/chatterino2-dankerino-git/dankerino is not a clone of https://github.com/Mm2PL/dankerino
    Aborting...
error: failed to download sources for 'chatterino2-dankerino-git-r3693.0c3cafa4-1': 
==> Making package: zfs-utils 2.1.4-1 (Fri Mar 25 23:30:14 2022)
==> Retrieving sources...
  -> Found zfs-2.1.4.tar.gz
  -> Found zfs-2.1.4.tar.gz.asc
  -> Found zfs.initcpio.install
  -> Found zfs.initcpio.hook
==> Validating source files with sha256sums...
    zfs-2.1.4.tar.gz ... Passed
    zfs-2.1.4.tar.gz.asc ... Skipped
    zfs.initcpio.install ... Passed
    zfs.initcpio.hook ... Passed
==> Validating source files with b2sums...
    zfs-2.1.4.tar.gz ... Passed
    zfs-2.1.4.tar.gz.asc ... Skipped
    zfs.initcpio.install ... Passed
    zfs.initcpio.hook ... Passed
==> Verifying source file signatures with gpg...
    zfs-2.1.4.tar.gz ... Passed
==> Making package: zfs-utils 2.1.4-1 (Fri Mar 25 23:30:15 2022)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found zfs-2.1.4.tar.gz
  -> Found zfs-2.1.4.tar.gz.asc
  -> Found zfs.initcpio.install
  -> Found zfs.initcpio.hook
==> Validating source files with sha256sums...
    zfs-2.1.4.tar.gz ... Passed
    zfs-2.1.4.tar.gz.asc ... Skipped
    zfs.initcpio.install ... Passed
    zfs.initcpio.hook ... Passed
==> Validating source files with b2sums...
    zfs-2.1.4.tar.gz ... Passed
    zfs-2.1.4.tar.gz.asc ... Skipped
    zfs.initcpio.install ... Passed
    zfs.initcpio.hook ... Passed
==> Verifying source file signatures with gpg...
    zfs-2.1.4.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting zfs-2.1.4.tar.gz with bsdtar
bsdtar: Failed to set default locale
==> Starting prepare()...
==> Sources are ready.
zfs-utils-2.1.4-1: parsing pkg list...
:: zfs-utils-2.1.4-1 is up to date -- skipping build
loading packages...
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: installing zfs-utils (2.1.4-1) breaks dependency 'zfs-utils=2.1.2' 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.4-1) breaks dependency 'zfs-utils=2.1.2' 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.4-1) breaks dependency 'zfs-utils=2.1.2' 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.4-1) breaks dependency 'zfs-utils=2.1.2' required by zfs-dkms
error: packages failed to build: chatterino2-dankerino-git-r3693.0c3cafa4-1  zfs-dkms-2.1.4-1  appimagelauncher-2.2.0-5  ttf-google-fonts-git-1:r2002.37e0f8a4-1
⋊> ~               

(I tried running it before, which is why everything is already pre-downloaded and ready)

As you can see, it is trying to update both the zfs-dkms and zfs-utils packages, but it does not want to.

Here you can have my paru.conf file, in case you need it

#
# $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 -hg
#AurOnly
#BottomUp
#RemoveMake
#SudoLoop
#UseAsk
#SaveChanges
#CombinedUpgrade
#CleanAfter
#UpgradeMenu
#NewsOnUpgrade

#LocalRepo
#Chroot
#Sign
#SignDb
#KeepRepoCache

#
# Binary OPTIONS
#
#[bin]
#FileManager = vifm
#MFlags = --skippgpcheck
#Sudo = doas

treejadey avatar Mar 25 '22 21:03 treejadey

I have the same problem.

mangoducksparkles avatar Mar 28 '22 18:03 mangoducksparkles

I encountered this also in the past using yay, but forgot the workaround...

Flova avatar Apr 26 '22 19:04 Flova

I encountered this also in the past using yay, but forgot the workaround...

this is the script I use

#!/bin/zsh

paru -Sy

g='/Version/{print $3}'
d1=$(paru -Qi zfs-dkms | gawk "$g")
d2=$(paru -Si zfs-dkms | gawk "$g")
u1=$(paru -Qi zfs-utils | gawk "$g")
u2=$(paru -Si zfs-utils | gawk "$g")

if [[ $d1 == $d2 || $u1 == $u2 ]]; then
	echo "zfs is up to date"
	exit 0
fi

paru -Sy zfs-dkms zfs-utils \
 --assume-installed zfs-dkms=$d1 --assume-installed zfs-dkms=$d2 \
 --assume-installed zfs-utils=$u1 --assume-installed zfs-utils=$u2

It uses paru -Qi to find the current versions and paru -Si to find the latest versions. Then it uses --assume-installed to just assume that both versions of both packages are installed, so that it can update both at once.

mangoducksparkles avatar May 03 '22 19:05 mangoducksparkles

that is a good script but i see no reason for this not to be integrated into the app itself

treejadey avatar May 03 '22 19:05 treejadey

that is a good script but i see no reason for this not to be integrated into the app itself

I agree. This bug should be fixed, but I thought others might find the information useful in the meantime.

mangoducksparkles avatar May 03 '22 19:05 mangoducksparkles

So a while ago I can't remember when, paru was changed to try and order stuff based on depends even when the depend is satisfied.

The original issue is not quite correct as dkms depends on a specific version of utils but utils does not depend on dkms. So with this ordering it should be fixed. Also there's --chroot if this comes up again.

Morganamilo avatar Nov 21 '22 22:11 Morganamilo

I am running into this bug again with the recently released zfs-dkms 2.1.13-1 and zfs-utils 2.1.13-2.

urbenlegend avatar Sep 28 '23 05:09 urbenlegend

@Morganamilo

The original issue is not quite correct as dkms depends on a specific version of utils but utils does not depend on dkms. So with this ordering it should be fixed. Also there's --chroot if this comes up again.

Unfortunately this is not correct, you will not be able to update either of them without --assume-installed.
If you try to update utils first, you will get an error saying that this breaks the dependency of dkms because dkms package depends on a certain version of utils.

allddd avatar Oct 14 '23 09:10 allddd