mirror of https://github.com/Chizi123/Arch-autobuild-repo.git

Joel Grunbaum
yesterday 40c68b29c46f28a10cbba0d725afd4f055cb5d5a
src/archrepobuild/cli.py
@@ -135,9 +135,9 @@
                    if result.status == BuildStatus.SUCCESS:
                        repo.add_packages(result)
                        console.print(f"[green]✓[/] {package} added successfully")
                        console.print(f"[green]✓[/] {package} processed successfully")
                    elif result.status == BuildStatus.SKIPPED:
                        console.print(f"[yellow]⏭[/] {package} skipped (already in official repos or installed)")
                        console.print(f"[yellow]⏭[/] {package} skipped (already in managed repository)")
                    else:
                        console.print(f"[red]✗[/] {package} failed: {result.error}")
@@ -165,8 +165,8 @@
                    resolver = DependencyResolver(aur)
                    for pkg in repo.list_packages():
                        if resolver.is_in_official_repos(pkg.name):
                            console.print(f"[yellow]Removing {pkg.name}[/] (now in official repos)")
                        if resolver.is_in_repos(pkg.name):
                            console.print(f"[yellow]Removing {pkg.name}[/] (now in repositories)")
                            builder.remove_package(pkg.name)
                            repo.remove_package(pkg.name)
                else:
@@ -179,8 +179,9 @@
@cli.command()
@click.option("--all-repos", "-a", is_flag=True, help="Include all enabled repositories, not just official ones")
@pass_context
def check(ctx: Context) -> None:
def check(ctx: Context, all_repos: bool) -> None:
    """Check for packages moved to official repos or removed from AUR."""
    config = ctx.config
@@ -196,13 +197,20 @@
            with console.status("Checking packages..."):
                for pkg in packages:
                    if resolver.is_in_official_repos(pkg.name):
                    # Ignore debug packages if the regular version is in official repos
                    if pkg.name.endswith("-debug"):
                        base_name = pkg.name[:-6]
                        if resolver.is_in_repos(base_name, include_all=all_repos) or await aur.is_available(base_name):
                            continue
                    if resolver.is_in_repos(pkg.name, include_all=all_repos):
                        in_official.append(pkg.name)
                    elif not await aur.is_available(pkg.name):
                        not_in_aur.append(pkg.name)
            if in_official:
                console.print("\n[yellow]Packages now in official repos:[/]")
                repo_type = "official" if not all_repos else "enabled"
                console.print(f"\n[yellow]Packages now in {repo_type} repos:[/]")
                for pkg in in_official:
                    console.print(f"  • {pkg}")