From 39266d86cee797061dde86b59947b9fe42ccdcd7 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Sun, 29 Sep 2019 20:47:41 -0300 Subject: [PATCH] improving Arch distro checking --- CHANGELOG.md | 1 + bauh/api/abstract/context.py | 1 - bauh/gems/arch/controller.py | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06b452c8..f8edf3d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/bauh/api/abstract/context.py b/bauh/api/abstract/context.py index 131f35c6..581fa40a 100644 --- a/bauh/api/abstract/context.py +++ b/bauh/api/abstract/context.py @@ -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 diff --git a/bauh/gems/arch/controller.py b/bauh/gems/arch/controller.py index b764439d..5b37cb72 100644 --- a/bauh/gems/arch/controller.py +++ b/bauh/gems/arch/controller.py @@ -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'])