diff --git a/lilac b/lilac index 3b57965..0058632 100755 --- a/lilac +++ b/lilac @@ -577,7 +577,11 @@ def main_may_raise( if pkgs_from_args: for p in pkgs_from_args: - build_reasons[p].append(BuildReason.Cmdline()) + if ':' in p: + p, runner = p.split(':', 1) + else: + runner = None + build_reasons[p].append(BuildReason.Cmdline(runner)) for p in need_rebuild_pkgrel: build_reasons[p].append(BuildReason.UpdatedPkgrel()) diff --git a/lilac2/nomypy.py b/lilac2/nomypy.py index 1480926..c230a64 100644 --- a/lilac2/nomypy.py +++ b/lilac2/nomypy.py @@ -1,6 +1,6 @@ # type: ignore -from typing import Union +from typing import Union, Optional from .typing import OnBuildEntry @@ -96,7 +96,15 @@ class FailedByDeps(BuildReason): def __init__(self, deps: tuple[str]) -> None: self.deps = deps -class Cmdline(BuildReason): pass +class Cmdline(BuildReason): + def __init__(self, runner: Optional[str]) -> None: + self.runner = runner + + def _extra_info(self) -> str: + if self.runner: + return repr(self.runner) + else: + return '' class OnBuild(BuildReason): def __init__(self, update_on_build: list[OnBuildEntry]) -> None: