pacaur icon indicating copy to clipboard operation
pacaur copied to clipboard

Remove makedepends after failed and successful build automatically.

Open bernimoses opened this issue 5 years ago • 4 comments

Version

pacaur -v

pacaur 4.8.6
Description

It would be nice if there was an option to automatically remove the makedepends (if installed while building) after a failed and successful build.

bernimoses avatar Nov 16 '19 14:11 bernimoses

bump? @E5ten

This is basically what's keeping us from migrating from pakku

tadly avatar Dec 31 '19 14:12 tadly

I'll try to give supporting this a shot when I get a chance, in the meantime, thoughts on how this should work? (like should it be default, what option should be made to enable it if not default or disable it if default, etc.)

E5ten avatar Dec 31 '19 20:12 E5ten

I honestly think it should be default and while I don't think there's need for it to be configurable, I generally like having the option to turn things on/off.

So, the config file (/etc/xdg/pacaur/config) could be extended with a removemakedepends=true.

I just installed pacaur using pakku and here's a snippet on how it behaves (just in case it isn't clear)

...
==> Finished making: pacaur 4.8.6-1 (Wed 01 Jan 2020 10:13:35 AM CET)
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) pacaur-4.8.6-1

Total Installed Size:  0.39 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                           [##############################] 100%
(1/1) checking package integrity                         [##############################] 100%
(1/1) loading package files                              [##############################] 100%
(1/1) checking for file conflicts                        [##############################] 100%
(1/1) checking available disk space                      [##############################] 100%
:: Processing package changes...
(1/1) installing pacaur                                  [##############################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
:: Removing build dependencies...
checking dependencies...

Packages (2) gmock-1.8.1-3  gtest-1.8.1-3

Total Removed Size:  3.02 MiB

:: Do you want to remove these packages? [Y/n] 
:: Processing package changes...
(1/2) removing gmock                                     [##############################] 100%
(2/2) removing gtest                                     [##############################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

As you can see I still had to confirm the removal as it's just funneled into pacman. As long as you can keep track of what the makedepends are, this should be pretty trivial.

Hope this helps, thanks for working on it and a happy new year :)

tadly avatar Jan 01 '20 09:01 tadly

A starting point for this could be the --rmdeps option of makepkg (i think this only works for successful builds). ;)

bernimoses avatar Mar 18 '20 10:03 bernimoses