mirror of
https://github.com/isjerryxiao/pacroller.git
synced 2024-11-14 20:32:24 +08:00
update checker
This commit is contained in:
parent
f72ea7a7d1
commit
0cad72d401
2 changed files with 7 additions and 9 deletions
|
@ -13,8 +13,7 @@ REGEX = {
|
||||||
's_process_pkg_changes': r':: Processing package changes\.\.\.',
|
's_process_pkg_changes': r':: Processing package changes\.\.\.',
|
||||||
's_post-transaction': r':: Running post-transaction hooks\.\.\.$',
|
's_post-transaction': r':: Running post-transaction hooks\.\.\.$',
|
||||||
's_optdepend': r'(?i)(?:new )?optional dependencies for (.+)$',
|
's_optdepend': r'(?i)(?:new )?optional dependencies for (.+)$',
|
||||||
's_optdepend_list': r' (.+): (?:.+)',
|
's_optdepend_list': r' ([^:^ ]+).*',
|
||||||
's_upgrade_pkg': r'upgrading (.+)\.\.\.',
|
|
||||||
'l_running_hook': r'running \'(.+)\'\.\.\.',
|
'l_running_hook': r'running \'(.+)\'\.\.\.',
|
||||||
'l_transaction_start': r'transaction started',
|
'l_transaction_start': r'transaction started',
|
||||||
'l_transaction_complete': r'transaction completed',
|
'l_transaction_complete': r'transaction completed',
|
||||||
|
@ -141,11 +140,7 @@ def _stdout_parser(stdout: List[str], report: checkReport) -> None:
|
||||||
break
|
break
|
||||||
report.info(f'new optional dependencies for {pkg}: {", ".join(optdeps)}')
|
report.info(f'new optional dependencies for {pkg}: {", ".join(optdeps)}')
|
||||||
else:
|
else:
|
||||||
# then it should be upgrade message
|
logger.debug(f'stdout {line=} is unknown')
|
||||||
if _m := REGEX['s_upgrade_pkg'].match(line):
|
|
||||||
logger.debug(f's_upgrade_pkg {line=}')
|
|
||||||
else:
|
|
||||||
logger.debug(f'stdout {line=} is unknown')
|
|
||||||
else:
|
else:
|
||||||
logger.debug(f'skip {line=}')
|
logger.debug(f'skip {line=}')
|
||||||
ln += 1
|
ln += 1
|
||||||
|
@ -241,7 +236,6 @@ def _log_parser(log: List[str], report: checkReport) -> None:
|
||||||
continue
|
continue
|
||||||
logger.debug(f'.install start {pkg=}')
|
logger.debug(f'.install start {pkg=}')
|
||||||
while True:
|
while True:
|
||||||
ln += 1
|
|
||||||
line = log[ln]
|
line = log[ln]
|
||||||
(_, source, msg) = _split_log_line(line)
|
(_, source, msg) = _split_log_line(line)
|
||||||
if source == 'ALPM-SCRIPTLET':
|
if source == 'ALPM-SCRIPTLET':
|
||||||
|
@ -255,6 +249,7 @@ def _log_parser(log: List[str], report: checkReport) -> None:
|
||||||
logger.debug(f'.install end {pkg=} {msg=}')
|
logger.debug(f'.install end {pkg=} {msg=}')
|
||||||
ln -= 1
|
ln -= 1
|
||||||
break
|
break
|
||||||
|
ln += 1
|
||||||
else:
|
else:
|
||||||
report.crit(f'{line=} has unknown source')
|
report.crit(f'{line=} has unknown source')
|
||||||
ln += 1
|
ln += 1
|
||||||
|
|
|
@ -37,5 +37,8 @@ KNOWN_PACKAGE_OUTPUT = {
|
||||||
*_keyring_output,
|
*_keyring_output,
|
||||||
r'gpg: marginals needed:.+ completes needed:.+ trust model: pgp',
|
r'gpg: marginals needed:.+ completes needed:.+ trust model: pgp',
|
||||||
r'gpg: depth:.+ valid:.+ signed:.+ trust:.+, .+, .+, .+, .+, .+',
|
r'gpg: depth:.+ valid:.+ signed:.+ trust:.+, .+, .+, .+, .+, .+',
|
||||||
]
|
],
|
||||||
|
'brltty': [
|
||||||
|
r'Please add your user to the brlapi group\.',
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue