mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-06 22:54:16 +02:00
[aur] fix config reading during dependency checking
This commit is contained in:
@@ -3,18 +3,18 @@ import re
|
||||
from typing import Tuple
|
||||
|
||||
from bauh.commons.system import SimpleProcess, ProcessHandler
|
||||
from bauh.gems.arch import CUSTOM_MAKEPKG_PATH, should_optimize_compilation
|
||||
from bauh.gems.arch import CUSTOM_MAKEPKG_PATH
|
||||
|
||||
RE_DEPS_PATTERN = re.compile(r'\n?\s+->\s(.+)\n')
|
||||
RE_UNKNOWN_GPG_KEY = re.compile(r'\(unknown public key (\w+)\)')
|
||||
|
||||
|
||||
def check(pkgdir: str, handler: ProcessHandler) -> dict:
|
||||
def check(pkgdir: str, optimize: bool, handler: ProcessHandler) -> dict:
|
||||
res = {}
|
||||
|
||||
cmd = ['makepkg', '-ALcf', '--check', '--noarchive', '--nobuild', '--noprepare']
|
||||
|
||||
if should_optimize_compilation():
|
||||
if optimize:
|
||||
if os.path.exists(CUSTOM_MAKEPKG_PATH):
|
||||
handler.watcher.print('Using custom makepkg.conf -> {}'.format(CUSTOM_MAKEPKG_PATH))
|
||||
cmd.append('--config={}'.format(CUSTOM_MAKEPKG_PATH))
|
||||
|
||||
Reference in New Issue
Block a user