E5ten / pacaur

An AUR helper that minimizes user interaction
https://bbs.archlinux.org/viewtopic.php?pid=1755144#p1755144
ISC License
110 stars 9 forks source link

Remove makedepends after failed and successful build automatically. #17

Open bernimoses opened 5 years ago

bernimoses commented 5 years ago
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.

tadly commented 4 years ago

bump? @E5ten

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

E5ten commented 4 years ago

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.)

tadly commented 4 years ago

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 :)

bernimoses commented 4 years ago

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