You are not logged in.

#1 2022-12-12 10:23:02

ttoirrah
Member
Registered: 2015-01-29
Posts: 52

pacman -S ruby - dependency cycle

I've just installed ruby without incident on two machines, and now, coming to my third, I get dependency cycle warnings. Here follows the full interaction (having done sudo pacman -Syyuu):

$ sudo pacman -S ruby
resolving dependencies...
looking for conflicting packages...
warning: dependency cycle detected:
warning: rubygems will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-abbrev will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-base64 will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-benchmark will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-bigdecimal will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-bundler will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-cgi will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-csv will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-date will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-delegate will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-did_you_mean will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-digest will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-drb will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-ruby2_keywords will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-english will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-erb will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-etc will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-fcntl will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-fiddle will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-fileutils will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-find will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-forwardable will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-getoptlong will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-io-console will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-io-nonblock will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-io-wait will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-ipaddr will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-irb will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-reline will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-json will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-logger will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-mutex_m will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-net-http will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-uri will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-open-uri will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-stringio will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-time will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-psych will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-racc will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-rdoc will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-tmpdir will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-minitest will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-power_assert will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-rake will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-rexml will be installed before its ruby dependency
warning: dependency cycle detected:
warning: ruby-test-unit will be installed before its ruby dependency

Packages (49) ruby-abbrev-0.1.0-4  ruby-base64-0.1.1-4  ruby-benchmark-0.2.0-4  ruby-bigdecimal-3.1.2-4
              ruby-bundledgems-3.0.4-20  ruby-bundler-2.3.25-1  ruby-cgi-0.3.6-1  ruby-csv-3.2.5-4
              ruby-date-3.2.2-4  ruby-delegate-0.2.0-4  ruby-did_you_mean-1.6.1-4  ruby-digest-3.1.0-6
              ruby-drb-2.1.0-5  ruby-english-0.7.1-5  ruby-erb-4.0.2-1  ruby-etc-1.3.0-6
              ruby-fcntl-1.0.1-4  ruby-fiddle-1.1.0-4  ruby-fileutils-1.6.0-4  ruby-find-0.1.1-4
              ruby-forwardable-1.3.2-6  ruby-getoptlong-0.1.1-3  ruby-io-console-0.5.11-3
              ruby-io-nonblock-0.1.0-3  ruby-io-wait-0.2.3-4  ruby-ipaddr-1.2.4-3  ruby-irb-1.4.2-1
              ruby-json-2.6.2-2  ruby-logger-1.5.1-3  ruby-minitest-5.16.3-1  ruby-mutex_m-0.1.1-3
              ruby-net-http-0.2.2-2  ruby-open-uri-0.2.0-3  ruby-power_assert-2.0.2-1
              ruby-psych-4.0.6-1  ruby-racc-1.6.0-3  ruby-rake-13.0.6-1  ruby-rdoc-6.4.0-4
              ruby-reline-0.3.1-2  ruby-rexml-3.2.5-1  ruby-ruby2_keywords-0.0.5-1
              ruby-stdlib-3.0.4-20  ruby-stringio-3.0.2-4  ruby-test-unit-3.5.5-1  ruby-time-0.2.0-4
              ruby-tmpdir-0.1.2-3  ruby-uri-0.11.0-5  rubygems-3.3.25-1  ruby-3.0.4-20

Total Download Size:    6.38 MiB
Total Installed Size:  25.36 MiB

:: Proceed with installation? [Y/n] n

I can't find any clarification on the Arch wiki, though I've found other advice not to be concerned, Pacman will cope. I've also found the PKGBUILD and wonder if there's something in there that could re-order the installation sequence. So, any advice how to proceed?

Offline

#2 2022-12-12 11:17:53

mpan
Member
Registered: 2012-08-01
Posts: 1,223
Website

Re: pacman -S ruby - dependency cycle

This dependency cycle is expected. There isn’t any clarification, as there is nothing wrong or requiring intervention. Ruby depends on those packages, and those packages depend on Ruby. pacman prints a warning on cyclic dependencies, because it must arbitrarily choose which package is installed first. Also because it may play a role if hooks are defined. Everything is fine here.

Using `pacman -Syyuu` for updates is not fine: it is both pointless and causes unneccessary load on the infrastructure.

Last edited by mpan (2022-12-12 11:18:03)


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#3 2022-12-12 18:06:26

ttoirrah
Member
Registered: 2015-01-29
Posts: 52

Re: pacman -S ruby - dependency cycle

Thanks, and also for the reminder about pacman -Syyuu). In my case I'd exceptionally run it on the first two machines after responding to a mirrorlist.pacnew, and so I'd suspected that'd changed something, which is why I tried it on the third machine, the only one that manifested these warnings.

Offline

#4 2022-12-12 23:09:08

mpan
Member
Registered: 2012-08-01
Posts: 1,223
Website

Re: pacman -S ruby - dependency cycle

“mirrorlist.pacnew” only delivers a new list of mirrors. All mirrors in it are commented out. Therefore it does not affect your currently used mirror, unless you yourself change it.

Even if you change a mirror, there is no reason for `-Syyuu`. Those are useful while dealing with some breakage scenarios or when shifting the entire system back using Arch Linux Archive. If other cases, there are three possible situations:

  • The new mirror and your system are in sync. Neither `-Syu` nor `-Syyuu` will cause any change.

  • The new mirror is ahead of your system. `-Syu` will properly download newer databases, because they are newer: no need for `-yy`. Since there is no older packages, `-uu` is a no-op.

  • The new mirror is behind your system. `-Syu` will do nothing until the mirror catches up with your system. For a healthy mirror that happens within a dozen hours. `-Syyuu` would downgrade packages on your system for no good reason, incurring maintenance costs and increasing potential for breakage, just to all this be reverted in a dozen hours by a normal update process. The only advantage of `-Syyuu` over `-Syu` in this scenario is that the latter prevents you from installing new packages in that short window needed for the mirror to update. But that advantage is minuscule, considering how unlikely the scenario is in the first place.


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#5 2022-12-13 08:07:27

Awebb
Member
Registered: 2010-05-06
Posts: 6,350

Re: pacman -S ruby - dependency cycle

To clarify further, -yy is what annoys people, because it causes extra traffic on the mirrors, especially since a lot of people have some sort of update OCD and do it multiple times per day. That's like taking five plates at a buffet, in case there is something wrong with the food.

Offline

#6 2022-12-13 23:17:38

mpan
Member
Registered: 2012-08-01
Posts: 1,223
Website

Re: pacman -S ruby - dependency cycle

It’s called CSD: Compulsive Syuing Disorder. wink

Unless coupled with -yy, I would not paint that as something negative.


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#7 2023-06-13 10:13:03

ttoirrah
Member
Registered: 2015-01-29
Posts: 52

Re: pacman -S ruby - dependency cycle

mpan & Awebb, thanks for your advice. I hadn't mentioned that I use reflector, like this

reflector --latest 30 --protocol https --sort age --save mirrorlist

so my /etc/pacman.d/mirrorlist is changed populated with a good selection of uncommented mirrors.

I recall that for a long time I just followed the ArchWiki's advice (2.1 Force pacman to refresh the package lists),

After creating/editing /etc/pacman.d/mirrorlist, issue the following command: # pacman -Syyu

My system at some point'd got into a tangle and I'd used -Syyuu, and in my ignorance left it like that.

mpan, I've taken your advice (here - as_root-reflector.sh). Perhaps you could add some clarifying words to the ArchWiki page, encouraging people not to use -Syyu unless truly necessary?

Offline

#8 2023-06-13 13:48:12

mpan
Member
Registered: 2012-08-01
Posts: 1,223
Website

Re: pacman -S ruby - dependency cycle

ttoirrah wrote:
reflector --latest 30 --protocol https --sort age --save mirrorlist

Note that this line will return up to 30 results. You may add `--number 1` to return only one.

ttoirrah wrote:

Perhaps you could add some clarifying words to the ArchWiki page, encouraging people not to use -Syyu unless truly necessary?

The linked section is about forcing pacman to unconditionally overwrite local databases in a particular scenario. Not about normal use of pacman.

There would be nothing to add too. The relevant warning is already present.


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#9 2023-06-13 14:39:13

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,658
Website

Re: pacman -S ruby - dependency cycle

ttoirrah wrote:

Perhaps you could add some clarifying words to the ArchWiki page, encouraging people not to use -Syyu unless truly necessary?

All the documentation shows how to do it properly `pacman -Syu`.  There really is no point in trying to enumerate all the ways to do something improperly.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#10 2023-06-20 17:23:06

ttoirrah
Member
Registered: 2015-01-29
Posts: 52

Re: pacman -S ruby - dependency cycle

mpan, I'm assuming that having more than one possible mirror is useful, though maybe 30's too many...

mpan & Awebb, that section 2.1 of the ArchWiki does appear to very clearly advise `# pacman -Syyu` after a pertinent change to `/etc/pacman.d/mirrorlist`, albeit with the caveat that it's expensive for the mirrors. I interpret this as clear advise to "do it when your mirrorlist has changed", so others probably would too, whereas you two seem to be advising against this...

Offline

#11 2023-06-20 18:11:17

mpan
Member
Registered: 2012-08-01
Posts: 1,223
Website

Re: pacman -S ruby - dependency cycle

ttoirrah wrote:

I'm assuming that having more than one possible mirror is useful, though maybe 30's too many...

pacman uses only the first entry; all other entries are completely ignored unless a particular condition occurs. Then pacman will try the next entry.

<opinion>The scenario, in which it will reliably work, is if the earlier mirror being completely and persistently down. What happens much more often are intermittent issues or a mirror misconfiguration. In which case having more than one entry leads to a cascade of hard to understand errors. So usually it not only doesn’t help at all, but causes only more trouble. And where it works reliably, it requires manual intervention; which would be required anyway if there was only a single entry. So no benefit either.</opinion>

Having more than a few entries is pointless from probabilistic point if view.


ttoirrah wrote:

that section 2.1 of the ArchWiki does appear to very clearly advise `# pacman -Syyu` after a pertinent change to `/etc/pacman.d/mirrorlist`, albeit with the caveat that it's expensive for the mirrors. I interpret this as clear advise to "do it when your mirrorlist has changed", so others probably would too, whereas you two seem to be advising against this...

There is no such advice. Out of four sentences in 2.1 dealing with `-Syyu`, two are setting conditions for its use. One in a clearly discouraging tone.

Last edited by mpan (2023-06-20 18:13:11)


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

Board footer

Powered by FluxBB