You are not logged in.
I know how to use "makepkg -si" to download, build, and install packages.
However, in one case, after downloading and building and installing, I want to make a source-code change and then re-build and re-install the updated package without re-downloading anything. I can't figure out how to use "makepkg" to simply re-build and re-install the updated code.
Or if "makepkg" cannot be used for this purpose, how can I re-build and re-install after code updates, using the same build sequence that "makepkg -si" utilizes?
Many thanks in advance for any ideas and suggestions.
Last edited by 911Gmta (2026-06-11 17:09:22)
Offline
you seem to misunderstand something important about the -s option
makepkg - builds the pack and uses what's available on the system - or fails if it misses dependencies
makepkg -i - same as above but after sucessful build calls pacman -U to install the package
makepkg -s - same as first but checks for and downloads missing dependencies
makepkg -si - same as second and third
so when you have to (re-)download something you either have cleaned up build-only dependencies with like pacman -Sc or pacman -Qdtq | pacman -Rns -
or due to updates the dependencies have changed since last build and hence need updates
usually when you just run makepkg it should just rebuild or fail - re-downloading hints user-caused error
Offline
you seem to misunderstand something important about the -s option
makepkg - builds the pack and uses what's available on the system - or fails if it misses dependencies
makepkg -i - same as above but after sucessful build calls pacman -U to install the package
makepkg -s - same as first but checks for and downloads missing dependencies
makepkg -si - same as second and third
Thank you very much. So, if I understand correctly, is the following what I would need to do in order to make a code change and then re-build? ...
(1) Unzip the "tar.gz" that was downloaded during the original "makepkg -si".
(2) Make the code changes.
(3) Re-zip the changed code back into the original "tar.gz" file.
(4) Run "makepkg" to rebuild with the changed code.
Last edited by 911Gmta (2026-06-11 16:50:57)
Offline
the wiki has good explanation: https://wiki.archlinux.org/title/Patching_packages
but in short, yes, it pretty much comes down to what you outlined
Offline
However, in one case, after downloading and building and installing, I want to make a source-code change and then re-build and re-install the updated package without re-downloading anything.
https://man.archlinux.org/man/makepkg.8#OPTIONS - "-e"
Also see "-o"
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Offline
the wiki has good explanation: https://wiki.archlinux.org/title/Patching_packages
but in short, yes, it pretty much comes down to what you outlined
Aha! I originally overlooked that "Patching Packages" wiki page.
Thank you very much. This answers my question.
Solved!
Offline