You are not logged in.

#1 Yesterday 16:58:45

sirozan
Member
Registered: Yesterday
Posts: 2

[SOLVED] find source of new dependency before installing it?

Hello, following situation:
I run pacman -Syu and in the list of packages that will be upgraded, there are also some new packages that were not installed before but will be installed.
Now i am curious why those packages will be installed.
I know that after i installed everything, i could use pacman -Qii <new_package> to see who depends on this new package and therefore caused its installation.
But is there also a way to check this before running the upgrade?

Last edited by sirozan (Today 09:13:06)

Offline

#2 Yesterday 17:04:23

cryptearth
Member
Registered: 2024-02-03
Posts: 2,313

Re: [SOLVED] find source of new dependency before installing it?

yes, with pacman -Si

Offline

#3 Yesterday 17:26:45

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,304

Re: [SOLVED] find source of new dependency before installing it?

Pass

--debug

to pacman

Offline

#4 Yesterday 19:21:09

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

Re: [SOLVED] find source of new dependency before installing it?

cryptearth wrote:

yes, with pacman -Si

How would that work - the dependency would only be shown in the dependent package which is what is sought and currently unknown.  An expac invocation could get the job done, but not `pacman -Si ...`.

EDIT: I suppose `pacman -Si` without any arguments technically would include the required information, but it'd be buried among nearly 300K lines of output that would need to be parsed with a non-trivial awk or sed script to find candidates that *might* be the relevant package.  So theoretically possible, but really a very very bad way to arrive at the sought after answer.

EDIT 2: running `pacman -Sii <new-dependency>` (two i's) in contrast could be useful.

Last edited by Trilby (Yesterday 19:25:20)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 Today 09:11:55

sirozan
Member
Registered: Yesterday
Posts: 2

Re: [SOLVED] find source of new dependency before installing it?

Thanks everyone for the answers.

So it works to manually compare the packages of my 'pacman -Syu' to the output of either 'pacman -Si <old_packages>' or 'pacman -Sii <new_dependency>. The latter being the more convenient direction because i at least know the new dependency is part of the dependency chain i am searching for, instead of having to randomly try all the other packages appearing in my 'pacman -Syu'.

Passing '--debug' to pacman is an even better option i think. A relevant excerpt of its output looks like this for example:

debug: started resolving dependencies
debug: checkdeps: package appstream-1.2.0-1
debug: checkdeps: missing dependency 'curl' for package 'appstream'
debug: checkdeps: missing dependency 'libvips' for package 'appstream'
debug: checkdeps: missing dependency 'libxml2' for package 'appstream'
debug: started resolving dependencies
debug: checkdeps: package curl-8.22.0-1
debug: finished resolving dependencies
debug: pulling dependency curl (needed by appstream)
debug: started resolving dependencies
debug: checkdeps: package libvips-8.18.6-1
debug: checkdeps: missing dependency 'cfitsio' for package 'libvips'
debug: checkdeps: missing dependency 'expat' for package 'libvips'
debug: checkdeps: missing dependency 'libcgif' for package 'libvips'
debug: checkdeps: missing dependency 'libimagequant' for package 'libvips'
debug: checkdeps: missing dependency 'libmatio' for package 'libvips'
debug: checkdeps: missing dependency 'libraw' for package 'libvips'
debug: started resolving dependencies
debug: checkdeps: package cfitsio-1:4.7.0-1
debug: checkdeps: missing dependency 'curl' for package 'cfitsio'
debug: finished resolving dependencies
debug: pulling dependency cfitsio (needed by libvips)
debug: started resolving dependencies
debug: checkdeps: package expat-2.8.4-1
debug: finished resolving dependencies
debug: pulling dependency expat (needed by libvips)
debug: started resolving dependencies
debug: checkdeps: package libcgif-0.5.4-1
debug: finished resolving dependencies
debug: pulling dependency libcgif (needed by libvips)
debug: started resolving dependencies
debug: checkdeps: package libimagequant-4.4.1-2
debug: finished resolving dependencies
debug: pulling dependency libimagequant (needed by libvips)
debug: started resolving dependencies
debug: checkdeps: package libmatio-1.5.30-1
debug: checkdeps: missing dependency 'hdf5' for package 'libmatio'
debug: started resolving dependencies
debug: checkdeps: package hdf5-2.2.0-1
debug: checkdeps: missing dependency 'libaec' for package 'hdf5'
debug: started resolving dependencies
debug: checkdeps: package libaec-1.1.7-1
debug: finished resolving dependencies
debug: pulling dependency libaec (needed by hdf5)
debug: finished resolving dependencies
debug: pulling dependency hdf5 (needed by libmatio)
debug: finished resolving dependencies
debug: pulling dependency libmatio (needed by libvips)
debug: started resolving dependencies
debug: checkdeps: package libraw-0.22.2-1
debug: finished resolving dependencies
debug: pulling dependency libraw (needed by libvips)
debug: finished resolving dependencies
debug: pulling dependency libvips (needed by appstream)
debug: started resolving dependencies
debug: checkdeps: package libxml2-2.15.4-1
debug: finished resolving dependencies
debug: pulling dependency libxml2 (needed by appstream)
debug: finished resolving dependencies

I managed to produce a pretty clean list of who-will-cause-which-new-dependencies with the following command:

sudo pacman -Syu --debug --print 2>&1 | grep needed

The only "problem" remaining with this list is that there seems to be no distinction possible between actual newly installed dependencies, and other dependencies that are also "needed" because there happens to be a newer version of them available within the same 'pacman -Syu'. But maybe that's too much to ask for now big_smile

Offline

Board footer

Powered by FluxBB