mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 00:04:15 +02:00
fix: arch -> conflict check for mirror packages | not building packages while checking
This commit is contained in:
@@ -28,7 +28,7 @@ URL_SRC_INFO = 'https://aur.archlinux.org/cgit/aur.git/plain/.SRCINFO?h='
|
|||||||
RE_SPLIT_VERSION = re.compile(r'(=|>|<)')
|
RE_SPLIT_VERSION = re.compile(r'(=|>|<)')
|
||||||
|
|
||||||
SOURCE_FIELDS = ('source', 'source_x86_64')
|
SOURCE_FIELDS = ('source', 'source_x86_64')
|
||||||
RE_PRE_DOWNLOADABLE_FILES = re.compile(r'^(https?|ftp)://.+\.\w+[^gpg|git]$')
|
RE_PRE_DOWNLOADABLE_FILES = re.compile(r'(https?|ftp)://.+\.\w+[^gpg|git]$')
|
||||||
|
|
||||||
|
|
||||||
class ArchManager(SoftwareManager):
|
class ArchManager(SoftwareManager):
|
||||||
@@ -501,7 +501,7 @@ class ArchManager(SoftwareManager):
|
|||||||
|
|
||||||
handler.watcher.change_substatus(self.i18n['arch.checking.conflicts'].format(bold(pkgname)))
|
handler.watcher.change_substatus(self.i18n['arch.checking.conflicts'].format(bold(pkgname)))
|
||||||
|
|
||||||
for check_out in SimpleProcess(['pacman', '-U', pkgpath], root_password=root_password, cwd=pkgdir).instance.stdout:
|
for check_out in SimpleProcess(['pacman', '-U' if install_file else '-S', pkgpath], root_password=root_password, cwd=pkgdir).instance.stdout:
|
||||||
check_install_output.append(check_out.decode())
|
check_install_output.append(check_out.decode())
|
||||||
|
|
||||||
self._update_progress(handler.watcher, 70, change_progress)
|
self._update_progress(handler.watcher, 70, change_progress)
|
||||||
@@ -520,7 +520,7 @@ class ArchManager(SoftwareManager):
|
|||||||
handler.watcher.change_substatus(self.i18n['arch.uninstalling.conflict'].format(bold(conflict)))
|
handler.watcher.change_substatus(self.i18n['arch.uninstalling.conflict'].format(bold(conflict)))
|
||||||
if not self._uninstall(conflict, root_password, handler):
|
if not self._uninstall(conflict, root_password, handler):
|
||||||
handler.watcher.show_message(title=self.i18n['error'],
|
handler.watcher.show_message(title=self.i18n['error'],
|
||||||
body=self.i18n['arch.uninstalling.conflict.fail'].format('"{}"'.format(conflict)),
|
body=self.i18n['arch.uninstalling.conflict.fail'].format(bold(conflict)),
|
||||||
type_=MessageType.ERROR)
|
type_=MessageType.ERROR)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ RE_UNKNOWN_GPG_KEY = re.compile(r'\(unknown public key (\w+)\)')
|
|||||||
|
|
||||||
def check(pkgdir: str, handler: ProcessHandler) -> dict:
|
def check(pkgdir: str, handler: ProcessHandler) -> dict:
|
||||||
res = {}
|
res = {}
|
||||||
success, output = handler.handle_simple(SimpleProcess(['makepkg', '-ALcf', '--check', '--noarchive'], cwd=pkgdir))
|
success, output = handler.handle_simple(SimpleProcess(['makepkg', '-ALcf', '--check', '--noarchive', '--nobuild'], cwd=pkgdir))
|
||||||
|
|
||||||
if 'Missing dependencies' in output:
|
if 'Missing dependencies' in output:
|
||||||
res['missing_deps'] = RE_DEPS_PATTERN.findall(output)
|
res['missing_deps'] = RE_DEPS_PATTERN.findall(output)
|
||||||
|
|||||||
Reference in New Issue
Block a user