buildqueue: Default to not include vcs packages again
Most of them are broken and don't produce the version they advertise, which makes it hard to deal with them in an automated fashion.
This commit is contained in:
@@ -5,7 +5,7 @@ from fastapi.responses import JSONResponse
|
||||
|
||||
from typing import Tuple, Dict, List, Set, Any, Iterable
|
||||
from .appstate import state, SrcInfoPackage
|
||||
from .utils import version_is_newer_than
|
||||
from .utils import version_is_newer_than, package_name_is_vcs
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@@ -36,7 +36,7 @@ def cmp_func(e1: Dict, e2: Dict) -> int:
|
||||
|
||||
|
||||
@router.get('/buildqueue')
|
||||
async def index(request: Request, response: Response, include_new: bool = True, include_update: bool = True) -> Response:
|
||||
async def index(request: Request, response: Response, include_new: bool = True, include_update: bool = True, include_vcs: bool = False) -> Response:
|
||||
srcinfos = []
|
||||
|
||||
# packages that should be updated
|
||||
@@ -45,6 +45,8 @@ async def index(request: Request, response: Response, include_new: bool = True,
|
||||
for k, p in sorted(s.packages.items()):
|
||||
if p.name in state.sourceinfos:
|
||||
srcinfo = state.sourceinfos[p.name]
|
||||
if package_name_is_vcs(s.name) and not include_vcs:
|
||||
continue
|
||||
if not version_is_newer_than(srcinfo.build_version, p.version):
|
||||
continue
|
||||
srcinfos.append(srcinfo)
|
||||
@@ -53,6 +55,8 @@ async def index(request: Request, response: Response, include_new: bool = True,
|
||||
if include_new:
|
||||
available: Dict[str, List[SrcInfoPackage]] = {}
|
||||
for srcinfo in state.sourceinfos.values():
|
||||
if package_name_is_vcs(srcinfo.pkgbase) and not include_vcs:
|
||||
continue
|
||||
available.setdefault(srcinfo.pkgname, []).append(srcinfo)
|
||||
for s in state.sources.values():
|
||||
for p in s.packages.values():
|
||||
|
||||
Reference in New Issue
Block a user