mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-06 22:54:16 +02:00
[README] and environment variables to disabled AppImage DatabaseUpdate and AUR Index Updater
This commit is contained in:
75
README.md
75
README.md
@@ -61,12 +61,48 @@ env/bin/bauh ( launches the application )
|
|||||||
|
|
||||||
If you do not want to clone / download this repository, go to your **Home** folder and execute the commands above, but replace the second by ```env/bin/pip install bauh```.
|
If you do not want to clone / download this repository, go to your **Home** folder and execute the commands above, but replace the second by ```env/bin/pip install bauh```.
|
||||||
|
|
||||||
|
|
||||||
### Autostart
|
### Autostart
|
||||||
In order to autostart the application, use your Desktop Environment settings to register it as a startup application / script (**bauh --tray=1**).
|
In order to autostart the application, use your Desktop Environment settings to register it as a startup application / script (**bauh --tray=1**).
|
||||||
|
|
||||||
|
### Gems ( package technology support )
|
||||||
|
#### Flatpak ( flatpak gem )
|
||||||
|
- The user is able to search, install, uninstall, downgrade, launch and retrieve the applications history
|
||||||
|
|
||||||
### Settings
|
#### Snap ( snap gem )
|
||||||
|
- The user is able to search, install, uninstall, refresh, launch and downgrade applications
|
||||||
|
|
||||||
|
#### AUR ( arch gem )
|
||||||
|
- It is **not enabled by default**
|
||||||
|
- The user is able to search, install, uninstall, downgrade, launch and retrieve the packages history
|
||||||
|
- It handles conflicts, and missing / optional packages installations ( including from your distro mirrors )
|
||||||
|
- If [**aria2**](https://github.com/aria2/aria2) is installed on your system and multi-threaded downloads are enabled ( see **BAUH_DOWNLOAD_MULTITHREAD** ), the source packages
|
||||||
|
will be pre-downloaded faster ( it does **NOT** modify your **pacman** settings ).
|
||||||
|
- Automatically makes simple package compilation improvements:
|
||||||
|
|
||||||
|
a) if **MAKEFLAGS** is not set in **/etc/makepkg.conf** and **~/.makepkg.conf** does not exist,
|
||||||
|
then a copy of **/etc/makepkg.conf** will be generated at **~/.makepkg.conf** defining MAKEFLAGS to work with
|
||||||
|
the number of your machine processors (**-j${nproc}**).
|
||||||
|
|
||||||
|
b) same as previous, but related to **COMPRESSXZ** definition ( if '--threads=0' is not defined )
|
||||||
|
|
||||||
|
Obs: this feature can be disabled through the environment variable **BAUH_ARCH_OPTIMIZE=0**
|
||||||
|
( For more information about these optimizations, check: https://wiki.archlinux.org/index.php/Makepkg )
|
||||||
|
- Arch package memory-indexer running every 20 minutes. This memory index is used when AUR Api cannot handle the amount of results found for a given search. It can be disabled via the environment variable **BAUH_ARCH_AUR_INDEX_UPDATER=0**.
|
||||||
|
- If some of your installed packages are not categorized, send an e-mail to **bauh4linux@gmail.com** informing their names and categories in the following format: ```name=category1[,category2,category3,...]```
|
||||||
|
|
||||||
|
#### AppImage ( appimage gem )
|
||||||
|
- The user is able to search, install, uninstall, downgrade, launch and retrieve the applications history
|
||||||
|
- Supported sources: [AppImageHub](https://appimage.github.io) ( **applications with no releases published to GitHub are currently not available** )
|
||||||
|
- Faster downloads if **aria2c** is installed. Same behavior described in the **AUR support** section.
|
||||||
|
- Installed applications are store at **~/.local/share/bauh/appimage/installed**
|
||||||
|
- Desktop entries ( menu shortcuts ) of the installed applications are stored at **~/.local/share/applications**
|
||||||
|
- Downloaded database files are stored at **~/.local/share/bauh/appimage** as **apps.db** and **releases.db**
|
||||||
|
- Databases updater daemon running every 20 minutes. It can be disabled via the environment variable **BAUH_APPIMAGE_DB_UPDATER=0**.
|
||||||
|
|
||||||
|
Obs: There are some crashes when **AppImageLauncher** is installed. It is advisable to uninstall it and reboot the system before trying to install an AppImage application.
|
||||||
|
|
||||||
|
|
||||||
|
### General settings
|
||||||
You can change some application settings via environment variables or arguments (type ```bauh --help``` to get more information).
|
You can change some application settings via environment variables or arguments (type ```bauh --help``` to get more information).
|
||||||
- **BAUH_SYSTEM_NOTIFICATIONS**: enable or disable system notifications. Use **0** (disable) or **1** (enable, default).
|
- **BAUH_SYSTEM_NOTIFICATIONS**: enable or disable system notifications. Use **0** (disable) or **1** (enable, default).
|
||||||
- **BAUH_CHECK_INTERVAL**: define the updates check interval in seconds. Default: 60.
|
- **BAUH_CHECK_INTERVAL**: define the updates check interval in seconds. Default: 60.
|
||||||
@@ -90,39 +126,6 @@ You can change some application settings via environment variables or arguments
|
|||||||
- If you don't mind to see the applications icons, you can set "download-icons=0" (**bauh --download-icons=0**). The application may have a slight response improvement, since it will reduce the parallelism within it.
|
- If you don't mind to see the applications icons, you can set "download-icons=0" (**bauh --download-icons=0**). The application may have a slight response improvement, since it will reduce the parallelism within it.
|
||||||
- Let the disk cache always enabled so **bauh** does not need to dynamically retrieve some data every time you launch it.
|
- Let the disk cache always enabled so **bauh** does not need to dynamically retrieve some data every time you launch it.
|
||||||
|
|
||||||
### Flatpak support ( flatpak gem )
|
|
||||||
- The user is able to search, install, uninstall, downgrade, launch and retrieve the applications history
|
|
||||||
|
|
||||||
### Snap support ( snap gem )
|
|
||||||
- The user is able to search, install, uninstall, refresh, launch and downgrade applications
|
|
||||||
|
|
||||||
### AUR support ( arch gem )
|
|
||||||
- It is **not enabled by default**
|
|
||||||
- The user is able to search, install, uninstall, downgrade, launch and retrieve the packages history
|
|
||||||
- It handles conflicts, and missing / optional packages installations ( including from your distro mirrors )
|
|
||||||
- If [**aria2**](https://github.com/aria2/aria2) is installed on your system and multi-threaded downloads are enabled ( see **BAUH_DOWNLOAD_MULTITHREAD** ), the source packages
|
|
||||||
will be pre-downloaded faster ( it does **NOT** modify your **pacman** settings ).
|
|
||||||
- Automatically makes simple package compilation improvements:
|
|
||||||
|
|
||||||
a) if **MAKEFLAGS** is not set in **/etc/makepkg.conf** and **~/.makepkg.conf** does not exist,
|
|
||||||
then a copy of **/etc/makepkg.conf** will be generated at **~/.makepkg.conf** defining MAKEFLAGS to work with
|
|
||||||
the number of your machine processors (**-j${nproc}**).
|
|
||||||
|
|
||||||
b) same as previous, but related to **COMPRESSXZ** definition ( if '--threads=0' is not defined )
|
|
||||||
|
|
||||||
Obs: this feature can be disabled through the environment variable **BAUH_ARCH_OPTIMIZE=0**
|
|
||||||
( For more information about these optimizations, check: https://wiki.archlinux.org/index.php/Makepkg )
|
|
||||||
- If some of your installed packages are not categorized, send an e-mail to **bauh4linux@gmail.com** informing their names and categories in the following format: ```name=category1[,category2,category3,...]```
|
|
||||||
|
|
||||||
### AppImage support ( appimage gem )
|
|
||||||
- The user is able to search, install, uninstall, downgrade, launch and retrieve the applications history
|
|
||||||
- Supported sources: [AppImageHub](https://appimage.github.io) ( **applications with no releases published to GitHub are currently not available** )
|
|
||||||
- Faster downloads if **aria2c** is installed. Same behavior described in the **AUR support** section.
|
|
||||||
- Installed applications are store at **~/.local/share/bauh/appimage/installed**
|
|
||||||
- Desktop entries ( menu shortcuts ) of the installed applications are stored at **~/.local/share/applications**
|
|
||||||
- Downloaded database files are stored at **~/.local/share/bauh/appimage** as **apps.db** and **releases.db**
|
|
||||||
|
|
||||||
Obs: There are some crashes when **AppImageLauncher** is installed. It is advisable to uninstall it and reboot the system before trying to install an AppImage application.
|
|
||||||
|
|
||||||
### Files and Logs
|
### Files and Logs
|
||||||
- Some application settings are stored in **~/.config/bauh/config.json**
|
- Some application settings are stored in **~/.config/bauh/config.json**
|
||||||
@@ -137,7 +140,7 @@ Obs: There are some crashes when **AppImageLauncher** is installed. It is advisa
|
|||||||
|
|
||||||
**view**: code associated with the graphical interface
|
**view**: code associated with the graphical interface
|
||||||
|
|
||||||
**gems**: code responsible to work with the different packaging technologies (every submodule deals with one or more types)
|
**gems**: code responsible to work with the different packaging technologies ( every submodule deals with one or more types )
|
||||||
|
|
||||||
**api**: code abstractions representing the main actions that a user can do with Linux packages (search, install, ...). These abstractions are implemented by the **gems**, and
|
**api**: code abstractions representing the main actions that a user can do with Linux packages (search, install, ...). These abstractions are implemented by the **gems**, and
|
||||||
the **view** code is only attached to them (it does not know how the **gems** handle these actions)
|
the **view** code is only attached to them (it does not know how the **gems** handle these actions)
|
||||||
|
|||||||
@@ -72,4 +72,4 @@ class DatabaseUpdater(Thread if bool(int(os.getenv('BAUH_DEBUG', 0))) else Proce
|
|||||||
self.logger.info('Sleeping')
|
self.logger.info('Sleeping')
|
||||||
time.sleep(self.sleep)
|
time.sleep(self.sleep)
|
||||||
else:
|
else:
|
||||||
self.logger.warning('Disabled')
|
self.logger.warning('AppImage database updater disabled')
|
||||||
|
|||||||
@@ -32,22 +32,26 @@ class AURIndexUpdater(Thread):
|
|||||||
self.http_client = context.http_client
|
self.http_client = context.http_client
|
||||||
self.logger = context.logger
|
self.logger = context.logger
|
||||||
self.man = man
|
self.man = man
|
||||||
|
self.enabled = bool(int(os.getenv('BAUH_ARCH_AUR_INDEX_UPDATER', 1)))
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
while True:
|
if self.enabled:
|
||||||
self.logger.info('Pre-indexing AUR packages in memory')
|
while True:
|
||||||
try:
|
self.logger.info('Pre-indexing AUR packages in memory')
|
||||||
res = self.http_client.get(URL_INDEX)
|
try:
|
||||||
|
res = self.http_client.get(URL_INDEX)
|
||||||
|
|
||||||
if res and res.text:
|
if res and res.text:
|
||||||
self.man.names_index = {n.replace('-', '').replace('_', '').replace('.', ''): n for n in res.text.split('\n') if n and not n.startswith('#')}
|
self.man.names_index = {n.replace('-', '').replace('_', '').replace('.', ''): n for n in res.text.split('\n') if n and not n.startswith('#')}
|
||||||
self.logger.info('Pre-indexed {} AUR package names in memory'.format(len(self.man.names_index)))
|
self.logger.info('Pre-indexed {} AUR package names in memory'.format(len(self.man.names_index)))
|
||||||
else:
|
else:
|
||||||
self.logger.warning('No data returned from: {}'.format(URL_INDEX))
|
self.logger.warning('No data returned from: {}'.format(URL_INDEX))
|
||||||
except ConnectionError:
|
except ConnectionError:
|
||||||
self.logger.warning('No internet connection: could not pre-index packages')
|
self.logger.warning('No internet connection: could not pre-index packages')
|
||||||
|
|
||||||
time.sleep(5 * 60) # updates every 5 minutes
|
time.sleep(60 * 20) # updates every 20 minutes
|
||||||
|
else:
|
||||||
|
self.logger.info("AUR index updater disabled")
|
||||||
|
|
||||||
|
|
||||||
class ArchDiskCacheUpdater(Thread if bool(os.getenv('BAUH_DEBUG', 0)) else Process):
|
class ArchDiskCacheUpdater(Thread if bool(os.getenv('BAUH_DEBUG', 0)) else Process):
|
||||||
|
|||||||
Reference in New Issue
Block a user