From 7d9104d139fb81afab47cad4b58a93f675d67c90 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Mon, 21 Oct 2019 15:21:52 -0300 Subject: [PATCH] [aur] fix: not able to work with .xpm icons --- CHANGELOG.md | 1 + bauh/gems/arch/disk.py | 3 +-- bauh/gems/arch/pacman.py | 2 +- bauh/gems/arch/worker.py | 2 -- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a972ca8..8617f1fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - update-checking for some scenarios - not respecting 'ignorepkg' settings in **pacman.conf** - not able to handle **missing dependencies with symbols** ( e.g: libpng++ ) + - not able to work with **.xpm** icons ## [0.7.0] 2019-10-18 ### Features diff --git a/bauh/gems/arch/disk.py b/bauh/gems/arch/disk.py index 507288e9..9e012f05 100644 --- a/bauh/gems/arch/disk.py +++ b/bauh/gems/arch/disk.py @@ -22,7 +22,7 @@ def write(app: ArchPackage): def fill_icon_path(app: ArchPackage, icon_paths: List[str], only_exact_match: bool): - ends_with = re.compile(r'.+/{}\.(png|svg)$'.format(app.icon_path if app.icon_path else app.name), re.IGNORECASE) + ends_with = re.compile(r'.+/{}\.(png|svg|xpm)$'.format(app.icon_path if app.icon_path else app.name), re.IGNORECASE) for path in icon_paths: if ends_with.match(path): @@ -142,4 +142,3 @@ def save_several(pkgnames: Set[str], mirror: str, overwrite: bool = True, mainta write(p) return len(to_write) return 0 - diff --git a/bauh/gems/arch/pacman.py b/bauh/gems/arch/pacman.py index 91a9a279..9e8e8d4d 100644 --- a/bauh/gems/arch/pacman.py +++ b/bauh/gems/arch/pacman.py @@ -145,7 +145,7 @@ def list_icon_paths(pkgnames: Set[str]) -> List[str]: installed_files = new_subprocess(['pacman', '-Qlq', *pkgnames]) icon_files = [] - for out in new_subprocess(['grep', '-E', '.(png|svg)$'], stdin=installed_files.stdout).stdout: + for out in new_subprocess(['grep', '-E', '.(png|svg|xpm)$'], stdin=installed_files.stdout).stdout: if out: line = out.decode().strip() if line: diff --git a/bauh/gems/arch/worker.py b/bauh/gems/arch/worker.py index 50910c9c..978ba102 100644 --- a/bauh/gems/arch/worker.py +++ b/bauh/gems/arch/worker.py @@ -8,8 +8,6 @@ from multiprocessing import Process from threading import Thread from typing import Dict, List -import requests - from bauh.api.abstract.context import ApplicationContext from bauh.api.abstract.controller import SoftwareManager from bauh.api.constants import HOME_PATH