You are not logged in.

#1 2017-04-05 14:45:06

alaneuler
Member
Registered: 2015-08-09
Posts: 35
Website

[SOLVED] Is this a dependency loop?

I find this by accident:

$ sudo pacman -Qi kio
Name            : kio
Version         : 5.32.0-2
Description     : Resource and network access abstraction
Architecture    : x86_64
URL             : https://community.kde.org/Frameworks
Licenses        : LGPL
Groups          : kf5
Provides        : None
Depends On      : solid  kjobwidgets  kbookmarks  libxslt  kwallet
                  desktop-file-utils  kinit
Optional Deps   : kio-extras: extra protocols support (sftp, fish and more)
                  kdoctools: for the help kioslave
                  knetattach: to add new kio-remote entries
Required By     : kinit
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 21.39 MiB
Packager        : Antonio Rojas <arojas@archlinux.org>
Build Date      : Sun 12 Mar 2017 08:19:15 AM CST
Install Date    : Mon 03 Apr 2017 02:46:52 PM CST
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature
$ sudo pacman -Qi kinit
Name            : kinit
Version         : 5.32.0-1
Description     : Process launcher to speed up launching KDE applications
Architecture    : x86_64
URL             : https://community.kde.org/Frameworks
Licenses        : LGPL
Groups          : kf5
Provides        : None
Depends On      : kio
Optional Deps   : None
Required By     : kio
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 513.00 KiB
Packager        : Antonio Rojas <arojas@archlinux.org>
Build Date      : Sat 11 Mar 2017 06:32:31 PM CST
Install Date    : Mon 03 Apr 2017 02:46:52 PM CST
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

`kio` required by kinit, and `kinit` required by kio.

How's this going?

Last edited by alaneuler (2017-04-06 11:16:04)

Offline

#2 2017-04-05 15:28:23

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,660

Re: [SOLVED] Is this a dependency loop?

There are a few packages that do this (notable example harfbuzz <-> freetype), what is your question exactly? Parts of library A use capabilites from library B and library B uses capabilities from library A, this isn't that uncommon.

Last edited by V1del (2017-04-05 15:29:57)

Offline

#3 2017-04-05 16:25:13

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,845
Website

Re: [SOLVED] Is this a dependency loop?

Yes, it's a dependency loop, but since Arch is a binary distribution, you (generally) don't need to worry about cyclic dependencies like this. The only exception would be if package A had an install scriptlet that depended on package B being up-to-date, but I can't think of any examples of that happening, and such problems could be worked around by the packager bf using an alpm hook instead of an install scriptlet. I'm not sure what logic pacman uses to resolve cyclic dependencies, but you could always look at the source code if you're interested in that sort of thing.

On a source-based distro (such as Gentoo), I imagine you would need to compile package A without the features provided by package B, then compile package B with the features provided by package A, then recompile package A with the features provided by package B.

Mod note: Not a pacman/upgrade issue, moving to NC. EDIT: thinking about it, I guess it is a discussion about pacman, so moving it back.

Last edited by WorMzy (2017-04-05 16:26:25)


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2017-04-06 00:06:54

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,385
Website

Re: [SOLVED] Is this a dependency loop?

Pacman gives up ordering a loop and prints a warning message.  I'd guess our sort is stable enough that packages would be installed alphabetically.

Offline

#5 2017-04-06 05:55:26

alaneuler
Member
Registered: 2015-08-09
Posts: 35
Website

Re: [SOLVED] Is this a dependency loop?

@V1del, I  just curious about this because I held the idea that loop dependency can't appear or there will be problems (don't remember where I see this) before. Obviously, I was wrong... Thank you for your reply.

And another problem (maybe trivial) I find with this is that: if a package A depends on kio, and I install package A by:

# pacman -S A

`kio` and `kinit` will be installed as dependencies, but when I want to uninstall package A without orphan packages:

# pacman -Rss A

problem comes:

`kio` and `kinit` is a loop dependency, so pacman won't remove them, and they remains in system forever (assume that no package depends on them anymore)

This is just a small problem though.

Last edited by alaneuler (2017-04-06 05:59:27)

Offline

#6 2017-04-06 08:14:24

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,385
Website

Re: [SOLVED] Is this a dependency loop?

alaneuler wrote:
# pacman -Rss A

problem comes:

`kio` and `kinit` is a loop dependency, so pacman won't remove them, and they remains in system forever (assume that no package depends on them anymore)

This is just a small problem though.

Fixed in git.

Offline

#7 2017-04-06 08:34:28

alaneuler
Member
Registered: 2015-08-09
Posts: 35
Website

Re: [SOLVED] Is this a dependency loop?

@Allan, you mean a fix to pacman?

Maybe a bug report is better for me smile

Last edited by alaneuler (2017-04-06 08:35:39)

Offline

#8 2017-04-06 08:43:18

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,385
Website

Re: [SOLVED] Is this a dependency loop?

The removal bug is fixed in pacman-git.

Offline

Board footer

Powered by FluxBB