Yes, you need root for that, otherwise get the Pacman source code, and hack the dependency on root out of it (https://gitlab.archlinux.org/pacman/pacman). This is because it's not common for package managers to install packages in the /home directory, even though they provide options to do so. For reference: https://gitlab.archlinux.org/search?search=rootdir&nav_source=navbar&project_id=19637&group_id=24&search_code=true&repository_ref=master As for pacman remembering the location, it doesn't do that unfortunately. Though it is possible to make it do so, but requires quite a bit of workarounds, like copying over all the files and directories pacman uses (/var/lib/pacman, /usr/share/pacman, /etc/pacman*, and so on) to your home directory (or separate partition), and you'll need to pass the "--sysroot" flag every time you want to update, so it's a bit anal. On 2023年08月18日 14:49, Carl Lei wrote: > On Fri, 18 Aug 2023 11:00:37 +0900 > "lain." <lain@xxxxxxxx> wrote: > > If directly from the pacman repo's: > > pacman -S android-ndk -r ~/.local -b /var/lib/pacman > > Hi, this complains I am not root. I don't really want to have > root-owned files in my home dir; also I'm curious, does pacman remember > to write android-ndk to this location when upgrading? -- lain.
Attachment:
signature.asc
Description: PGP signature