package module: add skip list for appstream data

parent 707e9535
......@@ -26,6 +26,13 @@ DEFAUIL_BRANCHES = [
"p10",
"p9"
]
APPSTREAM_SKIP_LIST = [
"-devel",
"-debuginfo",
"-gir",
"rpm-build",
"rpm-macros-"
]
BUGS_URL = "https://bugzilla.altlinux.org/"
PACKAGES_URL = "https://packages.altlinux.org/ru/{repo}/"
......
......@@ -11,6 +11,8 @@ from database.models import User
from database.func import DB
from services.utils import _bold
from config import APPSTREAM_SKIP_LIST
dp = Dispatch()
......@@ -89,12 +91,13 @@ async def package_info_handler(
binary_packages_message += f" {binary_package.name}"
binary_packages_message += f" ({", ".join(binary_package.archs)})\n"
app_id = altrepo.appstream.package.id_by_pkgname(
binary_package.name, branch
)
if app_id:
appstream_ids.append(app_id)
appstream_names.append(binary_package.name)
if not any(skip in binary_package.name for skip in APPSTREAM_SKIP_LIST):
app_id = altrepo.appstream.package.id_by_pkgname(
binary_package.name, branch
)
if app_id:
appstream_ids.append(app_id)
appstream_names.append(binary_package.name)
_package = DB.package.get(package.name)
summary = (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment