diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6248d6ff..d25f0d66 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -41,6 +41,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
+ - new settings property **aur_remove_build_dir** -> it defines if a package's generated build directory should be removed after the operation is finished (installation, upgrading, ...). Default: true
- preventing a possible error when the optional deps of a given package cannot be found
- Flatpak
diff --git a/README.md b/README.md
index 09d02cb9..7077bead 100644
--- a/README.md
+++ b/README.md
@@ -189,12 +189,13 @@ sync_databases_startup: true # package databases synchronization once a day dur
clean_cached: true # defines if old cached versions should be removed from the disk cache during a package uninstallation
refresh_mirrors_startup: false # if the package mirrors should be refreshed during startup
mirrors_sort_limit: 5 # defines the maximum number of mirrors that will be used for speed sorting. Use 0 for no limit or leave it blank to disable sorting.
-aur: true # allows to manage AUR packages
-repositories: true # allows to manage packages from the configured repositories
-repositories_mthread_download: false # enable multi-threaded download for repository packages if aria2/axel is installed
-automatch_providers: true # if a possible provider for a given package dependency exactly matches its name, it will be chosen instead of asking for the user to decide (false).
-edit_aur_pkgbuild: false # if the AUR PKGBUILD file should be displayed for edition before the make process. true (PKGBUILD will always be displayed for edition), false (PKGBUILD never will be displayed), null (a popup will ask if the user want to edit the PKGBUILD)
-aur_build_dir: null # defines a custom build directory for AUR packages (a null value will point to /tmp/bauh/arch (non-root user) or /tmp/bauh_root/arch (root user))
+aur: true. Default: true # allows to manage AUR packages
+repositories: true # allows to manage packages from the configured repositories. Default: true
+repositories_mthread_download: false # enable multi-threaded download for repository packages if aria2/axel is installed (otherwise pacman will download the packages). Default: false
+automatch_providers: true # if a possible provider for a given package dependency exactly matches its name, it will be chosen instead of asking for the user to decide (false). Default: true.
+edit_aur_pkgbuild: false # if the AUR PKGBUILD file should be displayed for edition before the make process. true (PKGBUILD will always be displayed for edition), false (PKGBUILD never will be displayed), null (a popup will ask if the user want to edit the PKGBUILD). Default: false.
+aur_build_dir: null # defines a custom build directory for AUR packages (a null value will point to /tmp/bauh/arch (non-root user) or /tmp/bauh_root/arch (root user)). Default: null.
+aur_remove_build_dir: true # it defines if a package's generated build directory should be removed after the operation is finished (installation, upgrading, ...). Options: true, false (default: true).
```
- Required dependencies:
- **pacman**
diff --git a/bauh/gems/arch/config.py b/bauh/gems/arch/config.py
index 0cae1f54..d95ae12c 100644
--- a/bauh/gems/arch/config.py
+++ b/bauh/gems/arch/config.py
@@ -16,7 +16,8 @@ def read_config(update_file: bool = False) -> dict:
'repositories_mthread_download': False,
'automatch_providers': True,
'edit_aur_pkgbuild': False,
- 'aur_build_dir': None}
+ 'aur_build_dir': None,
+ 'aur_remove_build_dir': True}
return read(CONFIG_FILE, template, update_file=update_file)
diff --git a/bauh/gems/arch/controller.py b/bauh/gems/arch/controller.py
index 583be3fe..4beb5a93 100644
--- a/bauh/gems/arch/controller.py
+++ b/bauh/gems/arch/controller.py
@@ -642,7 +642,7 @@ class ArchManager(SoftwareManager):
return False
finally:
- if os.path.exists(context.build_dir):
+ if os.path.exists(context.build_dir) and context.config['aur_remove_build_dir']:
context.handler.handle(SystemProcess(subproc=new_subprocess(['rm', '-rf', context.build_dir])))
return False
@@ -2150,7 +2150,7 @@ class ArchManager(SoftwareManager):
return self._build(context)
finally:
- if os.path.exists(context.build_dir):
+ if os.path.exists(context.build_dir) and context.config['aur_remove_build_dir']:
context.handler.handle(SystemProcess(new_subprocess(['rm', '-rf', context.build_dir])))
return False
@@ -2503,6 +2503,12 @@ class ArchManager(SoftwareManager):
max_width=max_width,
type_=SelectViewType.RADIO,
capitalize_label=False),
+ self._gen_bool_selector(id_='aur_remove_build_dir',
+ label_key='arch.config.aur_remove_build_dir',
+ tooltip_key='arch.config.aur_remove_build_dir.tip',
+ value=bool(local_config['aur_remove_build_dir']),
+ max_width=max_width,
+ capitalize_label=False),
FileChooserComponent(id_='aur_build_dir',
label=self.i18n['arch.config.aur_build_dir'],
tooltip=self.i18n['arch.config.aur_build_dir.tip'].format(BUILD_DIR),
@@ -2529,6 +2535,7 @@ class ArchManager(SoftwareManager):
config['repositories_mthread_download'] = form_install.get_component('mthread_download').get_selected()
config['automatch_providers'] = form_install.get_component('autoprovs').get_selected()
config['edit_aur_pkgbuild'] = form_install.get_component('edit_aur_pkgbuild').get_selected()
+ config['aur_remove_build_dir'] = form_install.get_component('aur_remove_build_dir').get_selected()
config['aur_build_dir'] = form_install.get_component('aur_build_dir').file_path
if not config['aur_build_dir']:
diff --git a/bauh/gems/arch/resources/locale/ca b/bauh/gems/arch/resources/locale/ca
index 6b46ef39..a65f0405 100644
--- a/bauh/gems/arch/resources/locale/ca
+++ b/bauh/gems/arch/resources/locale/ca
@@ -32,6 +32,8 @@ arch.config.automatch_providers=Auto-define dependency providers
arch.config.automatch_providers.tip=It automatically chooses which provider will be used for a package dependency when both names are equal.
arch.config.aur_build_dir=Build directory (AUR)
arch.config.aur_build_dir.tip=It define a custom directory where the AUR packages will be built. Default: {}.
+arch.config.aur_remove_build_dir=Remove build directory (AUR)
+arch.config.aur_remove_build_dir.tip=If a package's generated build directory should be removed after the operations is finished.
arch.config.clean_cache=Elimina les versions antigues
arch.config.clean_cache.tip=Si cal eliminar les versions antigues d'un paquet emmagatzemat al disc durant la desinstal·lació
arch.config.edit_aur_pkgbuild=Edit PKGBUILD (AUR)
diff --git a/bauh/gems/arch/resources/locale/de b/bauh/gems/arch/resources/locale/de
index caacf7d8..ecfd6a5c 100644
--- a/bauh/gems/arch/resources/locale/de
+++ b/bauh/gems/arch/resources/locale/de
@@ -32,6 +32,8 @@ arch.config.automatch_providers=Auto-define dependency providers
arch.config.automatch_providers.tip=It automatically chooses which provider will be used for a package dependency when both names are equal.
arch.config.aur_build_dir=Build directory (AUR)
arch.config.aur_build_dir.tip=It define a custom directory where the AUR packages will be built. Default: {}.
+arch.config.aur_remove_build_dir=Remove build directory (AUR)
+arch.config.aur_remove_build_dir.tip=If a package's generated build directory should be removed after the operations is finished.
arch.config.clean_cache=Remove old versions
arch.config.clean_cache.tip=Whether old versions of a package stored on disk should be removed during uninstall
arch.config.edit_aur_pkgbuild=Edit PKGBUILD (AUR)
diff --git a/bauh/gems/arch/resources/locale/en b/bauh/gems/arch/resources/locale/en
index f530e0c1..0151fcf9 100644
--- a/bauh/gems/arch/resources/locale/en
+++ b/bauh/gems/arch/resources/locale/en
@@ -33,6 +33,8 @@ arch.config.automatch_providers=Auto-define dependency providers
arch.config.automatch_providers.tip=It automatically chooses which provider will be used for a package dependency when both names are equal.
arch.config.aur_build_dir=Build directory (AUR)
arch.config.aur_build_dir.tip=It define a custom directory where the AUR packages will be built. Default: {}.
+arch.config.aur_remove_build_dir=Remove build directory (AUR)
+arch.config.aur_remove_build_dir.tip=If a package's generated build directory should be removed after the operations is finished.
arch.config.clean_cache=Remove old versions
arch.config.clean_cache.tip=Whether old versions of a package stored on disk should be removed during uninstall
arch.config.edit_aur_pkgbuild=Edit PKGBUILD (AUR)
diff --git a/bauh/gems/arch/resources/locale/es b/bauh/gems/arch/resources/locale/es
index a9f3f302..e255ef77 100644
--- a/bauh/gems/arch/resources/locale/es
+++ b/bauh/gems/arch/resources/locale/es
@@ -32,6 +32,8 @@ arch.config.automatch_providers=Autodefinir proveedores de dependencia
arch.config.automatch_providers.tip=Elige automáticamente qué proveedor se usará para una dependencia de paquete cuando ambos nombres son iguales.
arch.config.aur_build_dir=Directorio de compilación (AUR)
arch.config.aur_build_dir.tip=Define un directorio personalizado donde se construirán los paquetes AUR. Defecto: {}.
+arch.config.aur_remove_build_dir=Eliminar directorio de compilación (AUR)
+arch.config.aur_remove_build_dir.tip=Si el directorio de compilación generado para un paquete debe ser eliminado una vez finalizada la operación.
arch.config.clean_cache=Eliminar versiones antiguas
arch.config.clean_cache.tip=Si las versiones antiguas de un paquete almacenado en el disco deben ser eliminadas durante la desinstalación
arch.config.edit_aur_pkgbuild=Editar PKGBUILD (AUR)
diff --git a/bauh/gems/arch/resources/locale/it b/bauh/gems/arch/resources/locale/it
index a74eb7f2..f3bf0c22 100644
--- a/bauh/gems/arch/resources/locale/it
+++ b/bauh/gems/arch/resources/locale/it
@@ -32,6 +32,8 @@ arch.config.automatch_providers=Auto-define dependency providers
arch.config.automatch_providers.tip=It automatically chooses which provider will be used for a package dependency when both names are equal.
arch.config.aur_build_dir=Build directory (AUR)
arch.config.aur_build_dir.tip=It define a custom directory where the AUR packages will be built. Default: {}.
+arch.config.aur_remove_build_dir=Remove build directory (AUR)
+arch.config.aur_remove_build_dir.tip=If a package's generated build directory should be removed after the operations is finished.
arch.config.clean_cache=Rimuovi le vecchie versioni
arch.config.clean_cache.tip=Se le vecchie versioni di un pacchetto memorizzate sul disco devono essere rimosse durante la disinstallazione
arch.config.edit_aur_pkgbuild=Edit PKGBUILD (AUR)
diff --git a/bauh/gems/arch/resources/locale/pt b/bauh/gems/arch/resources/locale/pt
index 9b07819c..5ee94705 100644
--- a/bauh/gems/arch/resources/locale/pt
+++ b/bauh/gems/arch/resources/locale/pt
@@ -33,6 +33,8 @@ arch.config.automatch_providers=Auto-definir provedores de dependências
arch.config.automatch_providers.tip=Escolhe automaticamente qual provedor será utilizado para determinada dependência de um pacote caso os nomes de ambos sejam iguais.
arch.config.aur_build_dir=Diretório de construção (AUR)
arch.config.aur_build_dir.tip=Define um diretório personalizado onde pacotes do AUR serão construídos. Padrão: {}.
+arch.config.aur_remove_build_dir=Remover diretório de construção (AUR)
+arch.config.aur_remove_build_dir.tip=Se o diretório gerado para a construção de um pacote do AUR deve ser removido após a operação ser finalizada.
arch.config.clean_cache=Remover versões antigas
arch.config.clean_cache.tip=Se versões antigas de um pacote armazenadas em disco devem ser removidas durante a desinstalação
arch.config.edit_aur_pkgbuild=Editar PKGBUILD (AUR)
diff --git a/bauh/gems/arch/resources/locale/ru b/bauh/gems/arch/resources/locale/ru
index 2604e90a..62700a0e 100644
--- a/bauh/gems/arch/resources/locale/ru
+++ b/bauh/gems/arch/resources/locale/ru
@@ -32,6 +32,8 @@ arch.config.automatch_providers=Auto-define dependency providers
arch.config.automatch_providers.tip=It automatically chooses which provider will be used for a package dependency when both names are equal.
arch.config.aur_build_dir=Build directory (AUR)
arch.config.aur_build_dir.tip=It define a custom directory where the AUR packages will be built. Default: {}.
+arch.config.aur_remove_build_dir=Remove build directory (AUR)
+arch.config.aur_remove_build_dir.tip=If a package's generated build directory should be removed after the operations is finished.
arch.config.clean_cache=Remove old versions
arch.config.clean_cache.tip=Whether old versions of a package stored on disk should be removed during uninstall
arch.config.edit_aur_pkgbuild=Edit PKGBUILD (AUR)
diff --git a/bauh/gems/arch/resources/locale/tr b/bauh/gems/arch/resources/locale/tr
index 9e50bd93..8105a722 100644
--- a/bauh/gems/arch/resources/locale/tr
+++ b/bauh/gems/arch/resources/locale/tr
@@ -32,6 +32,8 @@ arch.config.automatch_providers=Auto-define dependency providers
arch.config.automatch_providers.tip=It automatically chooses which provider will be used for a package dependency when both names are equal.
arch.config.aur_build_dir=Build directory (AUR)
arch.config.aur_build_dir.tip=It define a custom directory where the AUR packages will be built. Default: {}.
+arch.config.aur_remove_build_dir=Remove build directory (AUR)
+arch.config.aur_remove_build_dir.tip=If a package's generated build directory should be removed after the operations is finished.
arch.config.clean_cache=Önbelleği temizle
arch.config.clean_cache.tip=Disk üzerinde kurulu bir paketin eski sürümlerinin kaldırma sırasında kaldırılıp kaldırılmayacağı
arch.config.edit_aur_pkgbuild=Edit PKGBUILD (AUR)