improving Arch distro checking

This commit is contained in:
Vinicius Moreira
2019-09-29 20:47:41 -03:00
parent fd2dbe7dd0
commit 39266d86ce
3 changed files with 2 additions and 2 deletions

View File

@@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [0.6.2] 2019-09-
### Improvements
- Update notifications showing the number of updates by type as well
- Improving Arch distro checking
### Fixes
- Update-check daemon not showing notifications

View File

@@ -32,7 +32,6 @@ class ApplicationContext:
self.cache_factory = cache_factory
self.disk_loader_factory = disk_loader_factory
self.logger = logger
self.linux_distro = platform.linux_distribution()
self.file_downloader = file_downloader
self.arch_x86_64 = sys.maxsize > 2**32

View File

@@ -50,7 +50,7 @@ class ArchManager(SoftwareManager):
self.comp_optimizer = ArchCompilationOptimizer(context.logger)
self.logger = context.logger
self.enabled = True
self.arch_distro = self.context.linux_distro[0].lower() == 'arch'
self.arch_distro = os.path.exists('/etc/arch-release')
def _upgrade_search_result(self, apidata: dict, installed_pkgs: dict, downgrade_enabled: bool, res: SearchResult, disk_loader: DiskCacheLoader):
app = self.mapper.map_api_data(apidata, installed_pkgs['not_signed'])