You are not logged in.
Hello everyone
I am still fairly new to creating PKGBUILDs and I have most of the basics down, but one thing that I have been wondering is about the PKGBUILD writing workflow and I haven't noticed this mentioned anywhere.
When I write a PKGBUILD, I test it out locally by seeing if I can build it using `makepkg -s`.
This of course leads to the package being installed on my system. I have been manually removing the stuff the PKGBUILD installs on my system up until now but I feel certain that there must be a safer and cleaner way of doing it?
Sorry for the newbie question but I reckon there must be some wisdom here I missed
best
Last edited by laszlohehehe (2020-10-06 09:02:16)
Offline
makepkg -s doesn't lead to the package getting installed. It leads to the dependencies that are in the repos to be installed and there should be little to no reason to change or remove these arbitrarily.
You can pass the -r flag in addition that will automatically clean up the dependencies when you are not actually installing the package and will thus lead to a Dependency based installation when you actually do end up installing the package which will get removed by a pacman -Rsn of the main package.
-r, --rmdeps
Upon successful build, remove any dependencies installed by makepkg during dependency auto-resolution and
installation when using -s.
Last edited by V1del (2020-10-06 08:17:58)
Online
makepkg -s doesn't lead to the package getting installed. It leads to the dependencies that are in the repos to be installed and there should be little to no reason to change or remove these arbitrarily.
You can pass the -r flag in addition that will automatically clean up the dependencies when you are not actually installing the package and will thus lead to a Dependency based installation when you actually do end up installing the package which will get removed by a pacman -Rsn of the main package.
man makepkg wrote:-r, --rmdeps
Upon successful build, remove any dependencies installed by makepkg during dependency auto-resolution and
installation when using -s.
sorry, I meant to say:
makepkg -si
This of course builds and installs the package using PACMAN.
... And I just realised that you can actually just use pacman to remove it again.
Offline
...
Well yes. Please mark as [SOLVED] by editing the title in your first post:
Online
makepkg -s doesn't lead to the package getting installed. It leads to the dependencies that are in the repos to be installed and there should be little to no reason to change or remove these arbitrarily.
You can pass the -r flag in addition that will automatically clean up the dependencies when you are not actually installing the package and will thus lead to a Dependency based installation when you actually do end up installing the package which will get removed by a pacman -Rsn of the main package.
man makepkg wrote:-r, --rmdeps
Upon successful build, remove any dependencies installed by makepkg during dependency auto-resolution and
installation when using -s.
That's a nice tip. Thank you
Offline
V1del wrote:makepkg -s doesn't lead to the package getting installed. It leads to the dependencies that are in the repos to be installed and there should be little to no reason to change or remove these arbitrarily.
You can pass the -r flag in addition that will automatically clean up the dependencies when you are not actually installing the package and will thus lead to a Dependency based installation when you actually do end up installing the package which will get removed by a pacman -Rsn of the main package.
man makepkg wrote:-r, --rmdeps
Upon successful build, remove any dependencies installed by makepkg during dependency auto-resolution and
installation when using -s.That's a nice tip. Thank you
If you feel capable of the setup, you can try preparing a clean chroot for building the packages, so that they will not affect your running environment at all.
Wiki: https://wiki.archlinux.org/index.php/De … ean_chroot
If you prepare it as a tmpfs you can even make it faster if you really need speed for, let's say, a 2GiB building workflow.
Or just if you don't want to trigger wear in your SSD.
Offline