Hello to everyone at the Manjaro forums! Keen to be here!
I want to install a package in a different location. I have tried various commands like sudo pacman -S <package_name> --root /chosen/directory/ and sudo pacman -S <package_name> --sysroot /chosen/directory/, but they both donāt do what I want them to.
I only want to install one particular package (and maybe its immediate dependencies) to this particular location, since I donāt want it on my main drive (the target directory is on a drive mounted at /mnt/sdb).
Is there anything I can do? A command line argument I overlooked? I have scoured the manpage, but I really canāt find anything.
Any help would be greatly appreciated. Thank you for your time
Iām afraid what you wish to do is a Windows-ism. GNU/Linux is a UNIX operating system, and UNIX doesnāt work that way.
The package always contains the paths to where the files from the package will be installed because UNIX is an integrated system. Once the package has been installed, its files will be distributed along the various directories of the filesystem hierarchy. So for instance, the shared libraries will always go under /usr/lib, the executables under /usr/bin, and so on.
The only exception to that rule are the games and stuff that you install through Lutris or Steam, because those are actually Windows games that have been made to run in GNU/Linux by way of a translation layer.
Now, the above all said, Snaps and Flatpaks are also different in that regard, because they are containerized applications ā they are not integrated with the rest of the operating system ā but even they normally have their designated directories contained in the package itself.
There is also certain third-party software that doesnāt come installed through the distributionās package manager ā although there are exceptions to that rule, e.g. Discord ā and that comes with an installer of its own, usually in the form of a self-extracting archive. Those packages will then normally go under /opt, although ā as I mentioned ā Discord is one of those weird ones; it installs partly under /usr and partly under /opt.
Thank you for that explanation! Iāve already learned a lot more about how UNIX systems manage packages, and explains a lot of the reasons why it looks like magic!
I guess Iāll just build it from source. When building something from source, are there easy ways to overwrite and update it? Does the only way to do it by deleting the old version and building the new version in its place? Are there any ways to go around that?
Hi @papajoke ! Sorry, Iāll be more specific about what I want to do.
So Iām looking to install OpenMW - what I have been doing in the past is building it from source, placing that on my āGamesā drive (since I keep all my games on a separate mounted drive), and playing it from there. I wanted to mod it easier, so I decided to use the portmod package alongside it (which creates mod lists for OpenMW). Since OpenMW is also in the [community] repository, I thought I could maybe install openmw (from the [community] repo) in a location that I wanted, install portmod (in the AUR) alongside it, find a way of linking portmod to the OpenMW install, and I could easily keep both updated through the system package manager, and not lose all my mod lists and configuration tweaks when I did so.
So a bit of a confusing way to go, but I thought āWhy not give it a try?ā, since thereās usually a way of getting things working the way that I want (So much freedom!). But by the sounds of it itās not actually possible, so then Iāll need to go back to building from source. But then Iām wondering if there are easy ways to keep it updated without breaking stuff.
Thatās the whole kaboodle of what Iām trying to do
Intricacies
So I know OpenMW keeps configuration files and save files and things like that in a different location, so I figure itās easily possible to overwrite the source without issues. However I think Portmod (although I havenāt used it yet) keeps local copies of the mod files, which might likely mess things up (I reckon).
I just thought itād be easier to do things through the system package manager (since the binaries are on there), but maybe doing something like this is more complex overall.
Links
Sorry, I had originally hyperlinked stuff in my post, but for some reason I canāt include links in my posts. So Iāll just put the links separately here (formatted badly with spaces since I canāt include links in my posts).