You are not logged in.

#1 2010-08-08 13:23:57

archguest
Member
Registered: 2010-07-29
Posts: 12

[SOLVED] Pacman's "Depends On" field

When I query how much space firefox is going to take and what its dependencies are I get a list and a value which are very different from what I get when I actually try to install it. Can somebody please explain why is it like that?

[lex@gaia ~]$ pacman -Si firefox
...
Depends On     : xulrunner=1.9.2.8  desktop-file-utils
Optional Deps  : None
Conflicts With : None
Replaces       : None
Download Size  : 771.98 K
Installed Size : 3628.00 K
...

[lex@gaia ~]$ sudo pacman -S firefox
Password: 
resolving dependencies...
looking for inter-conflicts...

Targets (4): mozilla-common-1.4-1  mime-types-1.0-3  xulrunner-1.9.2.8-1  firefox-3.6.8-1

Total Download Size:    16.09 MB
Total Installed Size:   83.33 MB
... 

Last edited by archguest (2010-08-09 14:28:55)

Offline

#2 2010-08-08 13:28:03

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: [SOLVED] Pacman's "Depends On" field

The "total installed size" gives the size for all packages that will be installed while p -Si only gives the size of the firefox package, not of its dependencies.

Offline

#3 2010-08-08 13:31:41

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: [SOLVED] Pacman's "Depends On" field

You also get the additional dependencies because xulrunner depends on mozilla-common-1.4-1  and mime-types-1.0-3, which are not already installed.


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#4 2010-08-08 13:33:19

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Pacman's "Depends On" field

That also depends on what you already have installed: if you already use xulrunner it won't be shown in 'pacman -S firefox' (unless you need a new version).

Offline

#5 2010-08-08 13:35:49

archguest
Member
Registered: 2010-07-29
Posts: 12

Re: [SOLVED] Pacman's "Depends On" field

Thanks guys, I understood that. What I wonder about is what use is "depends on" line if it does not show recursive dependencies? Is there a reason to why it doesn't?

The way it is now I can't tell how much is going to be installed and what until I try to install the package.

Last edited by archguest (2010-08-08 13:36:08)

Offline

#6 2010-08-08 13:50:56

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,019

Re: [SOLVED] Pacman's "Depends On" field

Install pacman-contrib, run "pactree firefox" and you will see why -Si/Qi doesn't show recursive dependencies.

Offline

#7 2010-08-08 13:53:59

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Pacman's "Depends On" field

archguest wrote:

Thanks guys, I understood that. What I wonder about is what use is "depends on" line if it does not show recursive dependencies? Is there a reason to why it doesn't?

The way it is now I can't tell how much is going to be installed and what until I try to install the package.

There are some tools that attempt to do that, but if you're so smart, tell me, would you count xulrunner as a firefox dependency if you already have it installed as a dependency for another package? There were similar discussions on the forums and there may be some similar feature requests in the bug tracker.

Nowadays people may have sh*tty cpus, so they prefer binary-based distro to a source-based one. They may have not that mush RAM, so they like lightweight apps, but most people have enough of harddrive space to simply install the thing, try it out and keep it if they like it - not because it's small, but because it works for them.

Offline

#8 2010-08-08 13:58:07

archguest
Member
Registered: 2010-07-29
Posts: 12

Re: [SOLVED] Pacman's "Depends On" field

lucke wrote:

Install pacman-contrib, run "pactree firefox" and you will see why -Si/Qi doesn't show recursive dependencies.

It's a big tree, but most of it already is installed. I probably chose a wrong word, I would not want to see *all* recursive dependencies, but I would like to see what will be installed *with* firefox. I can do that, but I need to sudo first and attempt to install it rather than just query.

Thanks anyway, I learned something new - pactree definitely is a useful tool!

Offline

#9 2010-08-08 14:04:45

archguest
Member
Registered: 2010-07-29
Posts: 12

Re: [SOLVED] Pacman's "Depends On" field

karol wrote:
archguest wrote:

Thanks guys, I understood that. What I wonder about is what use is "depends on" line if it does not show recursive dependencies? Is there a reason to why it doesn't?

The way it is now I can't tell how much is going to be installed and what until I try to install the package.

There are some tools that attempt to do that, but if you're so smart, tell me, would you count xulrunner as a firefox dependency if you already have it installed as a dependency for another package? There were similar discussions on the forums and there may be some similar feature requests in the bug tracker.

Nowadays people may have sh*tty cpus, so they prefer binary-based distro to a source-based one. They may have not that mush RAM, so they like lightweight apps, but most people have enough of harddrive space to simply install the thing, try it out and keep it if they like it - not because it's small, but because it works for them.

With due respect but I find your language offensive. I didn't say that I am smart and I did not even challenge the way things are. I asked *why* they are the way they are.

In answer to your question, xulrunner is a dependency because without it firefox won't run. Maybe what I am looking for is not a list of first-order dependencies for a package but a list of packages to be downloaded and installed with the package. In the context of your question, xulrunner would not be on that list as it already is installed.

I agree with you about the disk space. The disk space is not my concern. I just wanted to know why pacman does not display what packages will be downloaded and installed before I actually run install (as a root).

Despite I have not received an answer to my question, I now begin to think it was a design decision. I wonder if having this information displayed in addition to what pacman -Si already displays would be useful. The rationale would be that it is not reasonable to su or sudo just to find out how many packages need to be downloaded and installed to get some package working.

Last edited by archguest (2010-08-08 14:08:05)

Offline

#10 2010-08-08 14:27:19

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Pacman's "Depends On" field

pactree -l firefox | sort | uniq | xargs pacman -Qi | grep "Installed Size" | awk '{ sum += $4 }END{ print sum }'

Errors[1] should be harmless, the output is in KB.
Works for me but I gave it only a brief spin.

[1]

error: package "" not found
error: package "sh" not found

"sh" is the shell, bash, dash etc. provide sh.
After sorting the first line is empty. It's removal is left as en exercise for the reader ;P

Offline

#11 2010-08-08 14:42:07

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Pacman's "Depends On" field

Another useful tool is Allan's bigpkg https://bbs.archlinux.org/viewtopic.php?id=73098
IIRC his script takes into account things like how many packages need xulrunner and then it divides xulrunner's "weight" among that packages.

For firefox, that oneliner returned 384 MB (YMMV) while bigpkg showed 45 MB.

Offline

#12 2010-08-09 14:28:30

archguest
Member
Registered: 2010-07-29
Posts: 12

Re: [SOLVED] Pacman's "Depends On" field

Thanks for ideas everyone, I guess I will have to live with "pacman -S" then n for the love of standard approach across my machines.

Offline

Board footer

Powered by FluxBB