You are not logged in.
Hello everyone,
I've received 'dependency cycle detected' warnings (on regular update today). Is it safe to proceed?
sudo pacman -Syu
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
warning: dependency cycle detected:
warning: freetype2 will be installed before its harfbuzz dependency
warning: dependency cycle detected:
warning: mesa will be installed before its libglvnd dependency
warning: dependency cycle detected:
warning: smbclient will be installed before its cifs-utils dependency
Packages (201) alembic-1.8.3-2 alsa-card-profiles-1:0.3.38-1 aom-3.1.3-1 apache-2.4.50-1 appstream-0.14.6-1 audit-3.0.5-1 autoconf-archive-1:2021.02.19-2 bison-3.8.1-1 blender-17:2.93.5-1 brltty-6.4-1 btrfs-progs-5.14.1-1 ca-certificates-mozilla-3.71-1 cantarell-fonts-1:0.303-1 chromium-94.0.4606.81-1
cifs-utils-6.14-1..... (more packages etc...)
Total Download Size: 836,37 MiB
Total Installed Size: 4940,25 MiB
Net Upgrade Size: 214,71 MiB
:: Proceed with installation? [Y/n]Thanks in advance
Last edited by 754888 (2021-10-09 10:55:57)
Offline
Seems like you haven't done an update in a while. Install those dependency packages first:
sudo pacman -Sy --asdeps <packagename>You can try to install the dependencies all at once - in case you still encounter issues, try installing them one at a time and then do the update.
Last edited by dogknowsnx (2021-10-09 10:23:55)
Is it safe to proceed?
Yes.
Offline
754888 wrote:Is it safe to proceed?
Yes.
I did! Everything seems fine ![]()
Offline
Seems like you haven't done an update in a while. Install those dependency packages first:
sudo pacman -Sy --asdeps <packagename>You can try to install the dependencies all at once - in case you still encounter issues, try installing them one at a time and then do the update.
I did the installation because those dependencies was already installed (i will mark that post as solved). In the docs https://wiki.archlinux.org/title/pacman … ion_reason they say "When installing a package, it is possible to force its installation reason to dependency with: pacman -S --asdeps package_name", but still don't get it. Can someone please explain it with simple terms? In other words, what could happen in the worst case scenario?
Last edited by 754888 (2021-10-09 10:58:10)
Offline
Can someone please explain it with simple terms?
If a package requires other packages/libraries to work properly, the packager includes those packages in the dependency array in order for pacman to install these packages first (and mark them as dependencies).
It also helps in maintaining a tidy system, as dependencies that are no longer needed will show up as orphans and can be removed safely.
EDIT: A worst case scenario would be to mark vital packages that are not listed in any dependency array as such and than let pacman search for orphans and remove them in the process. A similar case may be a forced cascading removal of packages.
See 'man pacman' for a deeper understanding of package management and dependencies.
Last edited by dogknowsnx (2021-10-09 11:37:44)
So, that means, in my case those dependencies where harfbuzz (for freetype2), libglvnd (for mesa) and cifs-utils (for smbclient)? When i did pacman -Q harfbuzz libglvnd cifs-utils those packages where already installed!! So i had to remove them first? (still a bit lost here) Can you please give me an explanation specially for my case?
Last edited by 754888 (2021-10-09 11:05:34)
Offline
I mean, you will do that first:
sudo pacman -Sy --asdeps harfbuzz libglvnd cifs-utilsand then updates, when and only if are no warnings anymore?
sudo pacman -SyuOffline
or the following? (to install the packages with their dependencies)
sudo pacman -Sy --asdeps freetype2 mesa harfbuzzand then updates (if are no warnings)
sudo pacman -SyuOffline
or the following? (to install the packages with their dependencies)
sudo pacman -Sy --asdeps freetype2 mesa harfbuzzand then updates (if are no warnings)
sudo pacman -Syu
i think you meant that right?
Offline
If you try to install a package before its dependencies (given they are actually missing on the system), pacman will issue a warning and abort the installation unless told otherwise. How excactly did you do the update, now?
The '--asdeps' flag will simply store a package as not explicitly installed in pacman's database. If no other package is 'claiming' this package, it will become a so called orphaned package.
Last edited by dogknowsnx (2021-10-09 11:19:25)
I've just pressed Enter (for Y option)
Offline
If i reinstall freetype2 mesa and harfbuzz:
sudo pacman -S freetype2 mesa harfbuzzcan save me in case of future problems?
Last edited by 754888 (2021-10-09 11:21:18)
Offline
If i reinstall freetype2 mesa and harfbuzz (...) can save me in case of problems?
It certainly won't do any harm...
I'll do.
So (to get it right) next time it's better to do that first:
sudo pacman -S freetype2 mesa harfbuzzThat was you meant for today, right?
Offline
You're overcomplicating this. A warning is just this, a warning. It is not an error.
"freetype2 will be installed before its harfbuzz dependency", both will still be installed and/or updated just fine, it just means you need to be careful not to risk letting your package updates abort halfway through because then you run the risk of ending up with broken dependencies (in this case, freetype2 being installed/upgraded without its harfbuzz dependency also being installed/upgraded alongside it.)
As long as you just let pacman do its job and install the packages, everything will be installed as it should be and dependencies will be met. You don't need to do anything special.
These dependency cycles cannot be avoided because those packages mutually depend on each other. It doesn't matter which one you decide to install first, you'll get a dependency cycle warning regardless.
Last edited by Ammako (2021-10-09 11:30:36)
Offline
You're overcomplicating this. A warning is just this, a warning. It is not an error.
"freetype2 will be installed before its harfbuzz dependency", both will still be installed and/or updated just fine, it just means you need to be careful not to risk letting your package updates abort halfway through because then you run the risk of ending up with broken dependencies (in this case, freetype2 being installed/upgraded without its harfbuzz dependency also being installed/upgraded alongside it.)
As long as you just let pacman do its job and install the packages, everything will be installed as it should be and dependencies will be met. You don't need to do anything special.
These dependency cycles cannot be avoided because those packages mutually depend on each other. It doesn't matter which one you decide to install first, you'll get a dependency cycle warning regardless.
I see
I'll read the Docs for more.
So, thanks! (i've learned a lot about dependencies)
Have a nice weekend ![]()
Offline
Indeed everything stemming from that `pacman -Sy --asdeps` suggestion (including that suggestion itself) was bad advice. The warning you received from pacman was normal and expected. You will see it every time circularly-dependent packages are updated (freetype and harfbuz may be the most common example of this).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline