| | |
| | | |
| | | async def _add() -> None: |
| | | async with AURClient() as aur: |
| | | async with Builder(config, aur) as builder: |
| | | repo = RepoManager(config) |
| | | |
| | | repo = RepoManager(config) |
| | | async with Builder(config, aur, repo=repo) as builder: |
| | | results = [] |
| | | for package in packages: |
| | | console.print(f"[bold blue]Adding package:[/] {package}") |
| | |
| | | results.append(result) |
| | | |
| | | 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}") |
| | | |
| | |
| | | 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: |
| | |
| | | |
| | | with console.status("Checking packages..."): |
| | | for pkg in packages: |
| | | if resolver.is_in_official_repos(pkg.name, include_all=all_repos): |
| | | # 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) |