You are not logged in.

#1 2026-06-11 16:25:29

911Gmta
Member
Registered: 2026-06-06
Posts: 7

[Solved] After "makepkg -si", rebuilding without re-downloading?

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

#2 2026-06-11 16:37:51

cryptearth
Member
Registered: 2024-02-03
Posts: 2,217

Re: [Solved] After "makepkg -si", rebuilding without re-downloading?

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

#3 2026-06-11 16:48:41

911Gmta
Member
Registered: 2026-06-06
Posts: 7

Re: [Solved] After "makepkg -si", rebuilding without re-downloading?

cryptearth wrote:

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

#4 2026-06-11 17:00:54

cryptearth
Member
Registered: 2024-02-03
Posts: 2,217

Re: [Solved] After "makepkg -si", rebuilding without re-downloading?

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

#5 2026-06-11 17:03:08

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,506

Re: [Solved] After "makepkg -si", rebuilding without re-downloading?

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

#6 2026-06-11 17:09:01

911Gmta
Member
Registered: 2026-06-06
Posts: 7

Re: [Solved] After "makepkg -si", rebuilding without re-downloading?

cryptearth wrote:

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

Board footer

Powered by FluxBB