Solved How to download multiple packages at a time ?

rajagenupula

New Member


Messages: 4

with command

Bash:
pkg install package_name
all required packages are downloading one after another. Is there any we can download multiple packages at a time ?

Thanks
Raja Genupula
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,903
Messages: 31,199

No, it's mostly serialized. So it'll always download and install packages one after another. I presume at least that's what you're looking for? Having multiple packages downloaded concurrently instead of consecutively?
 

balanga

Son of Beastie

Reaction score: 143
Messages: 3,078

with command

Bash:
pkg install package_name
all required packages are downloading one after another. Is there any we can download multiple packages at a time ?

Thanks
Raja Genupula
Do you mean installing multiple packages using a single command? ... like this?
cat pkg-list | xargs pkg install -y
 
OP
OP
rajagenupula

rajagenupula

New Member


Messages: 4

balanga , No. At a time only one package will be downloaded right. I am trying to find a way to download multiple packages at at time.
 

Zirias

Aspiring Daemon

Reaction score: 224
Messages: 609

I wonder what problem that should solve ... after all, you're downloading from a package repository, IOW, all packages are downloaded from the same host. So it should be unlikely that having multiple connections in parallel would be substantially faster ...
 

balanga

Son of Beastie

Reaction score: 143
Messages: 3,078

What about a script such as:-
Code:
pkg install apache24  &
pkg install wordpress  &
I've no idea if it would give you anything...
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,903
Messages: 31,199

You might run into a race condition doing that. What if the second package has a dependency on apache24? The first command would download and install it but that might still be running when the second pkg-install(8) starts. It would then see it's missing apache24 and will try to install it too. You can get into some really weird situations.
 

balanga

Son of Beastie

Reaction score: 143
Messages: 3,078

OK, but in principle could you start installing pkgs seperately? Dependencies are obviously a problem...
 

Phishfry

Son of Beastie

Reaction score: 1,485
Messages: 4,297

Sounds like a job for pkg fetch -d packagename, then run pkg add packagename.tgz
pkg-fetch(8)
pkg-add(8)

I could see where an aggressive connection timeout could kick you offline on a large package installation.
 
Top