[aur] fix: not able to work with .xpm icons

This commit is contained in:
Vinicius Moreira
2019-10-21 15:21:52 -03:00
parent b0d09312c5
commit 7d9104d139
4 changed files with 3 additions and 5 deletions

View File

@@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- update-checking for some scenarios - update-checking for some scenarios
- not respecting 'ignorepkg' settings in **pacman.conf** - not respecting 'ignorepkg' settings in **pacman.conf**
- not able to handle **missing dependencies with symbols** ( e.g: libpng++ ) - not able to handle **missing dependencies with symbols** ( e.g: libpng++ )
- not able to work with **.xpm** icons
## [0.7.0] 2019-10-18 ## [0.7.0] 2019-10-18
### Features ### Features

View File

@@ -22,7 +22,7 @@ def write(app: ArchPackage):
def fill_icon_path(app: ArchPackage, icon_paths: List[str], only_exact_match: bool): 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: for path in icon_paths:
if ends_with.match(path): if ends_with.match(path):
@@ -142,4 +142,3 @@ def save_several(pkgnames: Set[str], mirror: str, overwrite: bool = True, mainta
write(p) write(p)
return len(to_write) return len(to_write)
return 0 return 0

View File

@@ -145,7 +145,7 @@ def list_icon_paths(pkgnames: Set[str]) -> List[str]:
installed_files = new_subprocess(['pacman', '-Qlq', *pkgnames]) installed_files = new_subprocess(['pacman', '-Qlq', *pkgnames])
icon_files = [] 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: if out:
line = out.decode().strip() line = out.decode().strip()
if line: if line:

View File

@@ -8,8 +8,6 @@ from multiprocessing import Process
from threading import Thread from threading import Thread
from typing import Dict, List from typing import Dict, List
import requests
from bauh.api.abstract.context import ApplicationContext from bauh.api.abstract.context import ApplicationContext
from bauh.api.abstract.controller import SoftwareManager from bauh.api.abstract.controller import SoftwareManager
from bauh.api.constants import HOME_PATH from bauh.api.constants import HOME_PATH