[appimage] improved the way sqlite3 and wget are checked

This commit is contained in:
Vinicius Moreira
2019-10-14 17:47:20 -03:00
parent 6d9cd42e4f
commit fd4df6d902
2 changed files with 6 additions and 11 deletions

View File

@@ -29,7 +29,8 @@ This project has an official Twitter account ( **@bauh4linux** ) so people can s
- **flatpak**: to be able to handle Flatpak applications - **flatpak**: to be able to handle Flatpak applications
- **snapd**: to be able to handle Snap applications - **snapd**: to be able to handle Snap applications
- **pacman**: to be able to handle AUR packages - **pacman**: to be able to handle AUR packages
- **wget**: to be able to handle AUR packages - **wget**: to be able to handle AppImage and AUR packages
- **sqlite3**: to be able to handle AppImage applications
- **git**: to be able to downgrade AUR packages - **git**: to be able to downgrade AUR packages
- **aria2**: faster AppImage and AUR source files downloading ( reduces packages installation time. More information below. ) - **aria2**: faster AppImage and AUR source files downloading ( reduces packages installation time. More information below. )
- **libappindicator3**: for the **tray mode** in GTK3 desktop environments - **libappindicator3**: for the **tray mode** in GTK3 desktop environments

View File

@@ -340,18 +340,12 @@ class AppImageManager(SoftwareManager):
self.enabled = enabled self.enabled = enabled
def _is_sqlite3_available(self): def _is_sqlite3_available(self):
try: res = run_cmd('which sqlite3')
new_subprocess(['sqlite3', '--version']) return res and not res.strip().startswith('which ')
return True
except FileNotFoundError:
return False
def _is_wget_available(self): def _is_wget_available(self):
try: res = run_cmd('which wget')
new_subprocess(['wget', '--version']) return res and not res.strip().startswith('which ')
return True
except FileNotFoundError:
return False
def can_work(self) -> bool: def can_work(self) -> bool:
return self._is_sqlite3_available() and self._is_wget_available() return self._is_sqlite3_available() and self._is_wget_available()