You are not logged in.

#1 2016-02-28 14:09:38

Auch999
Member
Registered: 2016-02-28
Posts: 13

List dependencies of a package

Hello :)

I'd like to obtain a list of all dependencies of a specific package, that ...

... (1) are required to compile and install the package (e.g. gcc>=5.3.0-3, libX>=0.0.1-1, ...)

... (2) are required to run executables contained in the package (e.g. libY>=0.0.1-1, ...)

... (3) can optionally be used by the executables contained in the package  (e.g. libZ>=0.0.1-1, ...)

I tried to obtain these lists with pacman, expac, pactree, but I'm unable to execatly get what I want ...

Preferably, I'd like to obtain these lists without the need to have the package installed.

Thank you in advance for your answers :)

Last edited by Auch999 (2016-02-28 14:18:02)

Offline

#2 2016-02-28 14:25:10

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

Re: List dependencies of a package

A PKGBUILD contains variables for each of those.  Get the PKGBUILD from the ABS.

The second two can be seen easily with pacman.  If it isn't obvious how to do so, you should probably check the man page.


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

Offline

#3 2016-02-28 14:25:59

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,707
Website

Re: List dependencies of a package

Trilby wrote:

A PKGBUILD contains variables for each of those.  Get the PKGBUILD from the ABS.

Or from the packages link if you want a www interface for whatever reason.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2016-02-28 14:26:41

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,438

Re: List dependencies of a package

pacman -Si xxx

for package in official repos, they are pre-built, so no build dependencies, for aur package replace pacman with yaourt

Offline

#5 2016-02-28 14:35:36

Auch999
Member
Registered: 2016-02-28
Posts: 13

Re: List dependencies of a package

Well thanks but when I look at the PKGBUILD for 'linux' for example, there is no gcc or make mentioned as a prerequisite to build the kernel - where do these come from?

Offline

#6 2016-02-28 14:37:39

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

Re: List dependencies of a package

Please make an effort to search for your own answers:
https://wiki.archlinux.org/index.php/PKGBUILD

Also, this sounds very much like an XY problem - what are you actually trying to do?


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

Offline

#7 2016-02-28 14:50:40

Auch999
Member
Registered: 2016-02-28
Posts: 13

Re: List dependencies of a package

Okay, I searched the wiki and it says packages are built with makepkg and the packages of the base-devel group are assumed to be installed already - so basically all base-devel packages are unmentioned build-dependencies for all other packages?

Trilby wrote:

what are you actually trying to do?

I want to build an arch package in a container which only contains its build dependencies and the build dependencies' runtime dependencies.

Offline

#8 2016-02-28 14:54:56

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,707
Website

Re: List dependencies of a package

Auch999 wrote:

I want to build an arch package in a container which only contains its build dependencies and the build dependencies' runtime dependencies.

This is precisely why I wrote clean-chroot-manager.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2016-02-28 14:59:48

Auch999
Member
Registered: 2016-02-28
Posts: 13

Re: List dependencies of a package

graysky wrote:
Auch999 wrote:

I want to build an arch package in a container which only contains its build dependencies and the build dependencies' runtime dependencies.

This is precisely why I wrote clean-chroot-manager.

Interesting, I'll have a look smile

Offline

#10 2016-02-28 15:23:36

Auch999
Member
Registered: 2016-02-28
Posts: 13

Re: List dependencies of a package

So as a follow-up-question,

since the makedepends variable of a PKGBUILD of a package does not contain the packages from the base-devel group it really needs, there is no clean way to determine the specific build dependencies (without unneeded packages from base-devel) of an arch package?

Offline

#11 2016-02-28 15:24:08

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,802

Re: List dependencies of a package

Nope.

In addition to clean-chroot-manager, you can also look at the scripts in the devtools package that will create a chroot and build in it. This is how packages in the repos are generally built.

Last edited by Scimmia (2016-02-28 15:25:42)

Offline

#12 2016-02-28 15:26:03

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,165
Website

Re: List dependencies of a package

Auch999 wrote:

So as a follow-up-question,

since the makedepends variable of a PKGBUILD of a package does not contain the packages from the base-devel group it really needs, there is no clean way to determine the specific build dependencies (without unneeded packages from base-devel) of an arch package?

It's assumed that you will have the base-devel package installed to do any kind of package building in ArchLinux. Just like how you need the build-essentials package in Ubuntu for the same thing, even though nobody lists it as a dependency.


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

Board footer

Powered by FluxBB