You are not logged in.

#1 2024-08-18 18:21:04

gcb
Member
Registered: 2014-02-12
Posts: 212

[SOLVED] pacman download only

I know -Sw can download into the system cache (https://bbs.archlinux.org/viewtopic.php?id=60907), but let's say i just want to fetch one package, nothing else? Can pacman help me with that or do I have to manually download it?

I just want to, as a regular user, say `-Sw x` and have x.tgz in my working directory. Already tried fooling it with `-Sw --sysroot .` but it still requires root and will probably try to recreate ./etc and ./var

---

Longer story, I'm trying to install something that have some silly dependencies so i plan to just download the package and get the one binary i need out instead of dealing with the source smile

Last edited by gcb (2024-08-21 17:35:46)

Offline

#2 2024-08-18 18:36:12

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

Re: [SOLVED] pacman download only

If you only want to download one package, then just do that:

pacman -Sw $pkgname

Then if you really need it in your current working directory, just copy / move it there:

cp /var/cache/pacman/pkg/$pkgname<TAB> ./

In any reasonable shell, tab completion should fill the whole filename there.

That said I suspect there'd be better approaches than this for this goal:

gcb wrote:

Longer story, I'm trying to install something that have some silly dependencies so i plan to just download the package and get the one binary i need out instead of dealing with the source smile

However, a little more detail would be needed to get the most relevant approach.

Last edited by Trilby (2024-08-18 18:38:33)


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

Offline

#3 2024-08-18 18:38:50

loqs
Member
Registered: 2014-03-06
Posts: 18,893

Re: [SOLVED] pacman download only

`pacman -Spdd x` will get the URL if it is not in pacman's cache which you could feed as the input to curl.

Offline

#4 2024-08-18 20:03:40

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

Re: [SOLVED] pacman download only

gcb wrote:

Longer story, I'm trying to install something that have some silly dependencies so i plan to just download the package and get the one binary i need out instead of dealing with the source smile

if what you want to install depends on what you try to get into your PWD than this should be handled by pacman anyway - as long as the target package has its deps correctly marked - which seems not the case - I would report upstream to get the deps fixed
otherwise you can install packages as deps by

pacman -Ud package

so they become available for the target pkg to recognize and install without issues
that's how I upgrade my zfs: first build the new package - install it as dep and then update the kernel and reboot

Offline

#5 2024-08-18 21:33:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,825

Re: [SOLVED] pacman download only

You can btw. also just download packages from https://archlinux.org/packages

Online

#6 2024-08-21 17:35:34

gcb
Member
Registered: 2014-02-12
Posts: 212

Re: [SOLVED] pacman download only

Thanks everyone.

Learned about -Sp today!

> as long as the target package has its deps correctly marked - which seems not the case - I would report upstream to get the deps fixed

good suggestions all around. and yes, trying to fix the underlying problem. if anyone's curious https://gitlab.archlinux.org/archlinux/ … -/issues/1

cheers.

Offline

Board footer

Powered by FluxBB