You are not logged in.
Hi people,
I was wondering: what is the best way to install all the dependencies from a given package (or PKGBUILD, for that matter), but without installing the package itself? In other words, the equivalent of apt-get build-dep for pacman?
This use case appeared for me a few times, for specific reasons -- I had to compile some libraries, but without installing them on the system (ogre and bullet). Whatever.
There are a few references about this [1,2], but they are referring to `makepkg -s`, which is NOT what I want, because it also tries to compile the package (edit: compile the package with makepkg). Okay, I can do a Control-C after the dependencies are installed...but I wonder if there is anything better than that?
Also, `makepkg -s` is not useful for binaries (packages in a repo). How to proceed in this case?
[1]: https://bbs.archlinux.org/viewtopic.php?id=111681
[2]: https://wiki.archlinux.org/index.php/Pacman_Rosetta (search for build-dep)
Last edited by thiagowfx (2015-03-29 00:00:06)
Offline
Not sure I understand.
You can create a dummy PKGBUILD that will have the needed packages listed as the dependencies but won't install the package itself.
Something like https://aur.archlinux.org/packages/dropbox-dummy/ or https://aur.archlinux.org/packages/te/t … y/PKGBUILD
Offline
This idea ("dummy packages") is cool, but it is different.
I simply want to be able to compile a given package locally --> WITHOUT using makepkg. To do that on Arch, the easiest way is to install all of the makedependencies of the package I want to compile, then compile it.
That is what I want: install all the dependencies from a given package (-->dependencies + makedependencies). But not the package. Sounds clear now?
I can understand if you don't understand the reasons I need to do that, it is specific: there are a few programs I need for a project I'm doing, and those packages need to be installed locally, without the package manager, because they are supposed to run on any linux distro. So I cannot install the package (I used ogre as an example) directly on Arch: I have, instead, to compile it locally and install it somewhere (for example, $HOME/.lib).
So, to compile it, I need its makedependencies.
Offline
You can combine -s with -o (--nobuild) and -e (--noextract). But I don't think makepkg is really the right tool for the job..
Ideally, one should be able to extract the make/depends and pass them to 'pacman -S --asdeps' all in one go.
Last edited by WorMzy (2015-03-19 16:10:24)
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Don't have arch in front of me so can't verify, but going from man pacman I'd assume
# pacman -S --assume-installed <package=version>
Last edited by V1del (2015-03-19 18:32:06)
Offline
Ideally, one should be able to extract the make/depends and
Yes, this would be perfect. A generic 'pacman -Si | grep Depends On <plus something else>' would work, but wouldn't be much reliable (and would be locale dependent).
But I don't think makepkg is really the right tool for the job.
pass them to 'pacman -S --asdeps' all in one go.
Yeah, that's why I put pacman (not makepkg) on the title
Offline
Don't have arch in front of me so can't verify, but going from man pacman I'd assume
# pacman -S --assume-package <package=version>
Tried:
% sudo pacman -S --assume-installed ogre=1.9.0-8
error: no targets specified (use -h for help)
Also:
% sudo pacman -S --assume-installed ogre=1.9
error: no targets specified (use -h for help)
% sudo pacman -S --assume-installed ogre
error: no targets specified (use -h for help)
Am I missing anything? (it is assume-installed, assume-package doesn't exist)
Offline
pacman knows nothing about makedepends and packages can have runtime-only dependencies that makepkg -s will not see. The only method guaranteed to bring in all dependencies needed to build and use a package is:
makepkg -si; pacman -R <pkg>
All of that information is in the package itself though, if you want to extract it manually.
Offline
That flag is for the opposite effect. It tells pacman to assume a specific package/version is installed and therefore *not* install it if it is required by one of the targets provided.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
My conclusion -- the best thing I can currently do is:
- For binary packages:
sudo pacman -S ogre bullet && sudo pacman -R ogre bullet
.
- For PKGBUILDs:
makepkg -si && sudo pacman -R <package-name>
but please be aware that this won't work on all cases.
I would open a feature request in our bugtracker for this use case for pacman/makepkg, but it seems that it is not so common...
Offline
The PKGBUILD version only needs:
makepkg -s
Don't "-i" it just to subsequently uninstall it.
EDIT: or even better, follow WorMzy's advice above. -seo should work. And for repo packages:
pacman -S $(expac -S "%E" <package-name>)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline