From 64ad5f949d99d73c8f8e6a937af5a624a9b71f81 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Wed, 23 Aug 2023 18:31:45 +0300 Subject: [PATCH] Add patches support for buildroot --- repology/parsers/parsers/buildroot.py | 4 ++++ repos.d/buildroot.yaml | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/repology/parsers/parsers/buildroot.py b/repology/parsers/parsers/buildroot.py index b6a4fe834..6b43a2115 100644 --- a/repology/parsers/parsers/buildroot.py +++ b/repology/parsers/parsers/buildroot.py @@ -42,4 +42,8 @@ def iter_parse(self, path: str, factory: PackageFactory) -> Iterable[PackageMake cpe_components = cpeid.split(':') pkg.add_cpe(cpe_components[3], cpe_components[4]) + pkg.set_extra_field('pkg_path', pkgdata['pkg_path']) + if patch_files := pkgdata['patch_files']: + pkg.set_extra_field('patch', patch_files) + yield pkg diff --git a/repos.d/buildroot.yaml b/repos.d/buildroot.yaml index ae42491a6..bd5a78355 100644 --- a/repos.d/buildroot.yaml +++ b/repos.d/buildroot.yaml @@ -2,6 +2,7 @@ # Buildroot ########################################################################### {% macro buildroot(branch) %} +{% set branchparam = '?h=' + branch if branch != 'master' else '' %} - name: buildroot_{{branch}} type: repository desc: Buildroot {{branch}} @@ -22,9 +23,13 @@ url: https://git.busybox.net/buildroot/ packagelinks: - type: PACKAGE_RECIPE - url: https://git.busybox.net/buildroot/tree/{path}?h={{branch}} + url: https://git.busybox.net/buildroot/tree/{path}{{branchparam}} - type: PACKAGE_RECIPE_RAW - url: https://git.busybox.net/buildroot/plain/{path}?h={{branch}} + url: https://git.busybox.net/buildroot/plain/{path}{{branchparam}} + - type: PACKAGE_PATCH + url: https://git.busybox.net/buildroot/tree/{pkg_path}/{?patch}{{branchparam}} + - type: PACKAGE_PATCH_RAW + url: https://git.busybox.net/buildroot/plain/{pkg_path}/{?patch}{{branchparam}} groups: [ all, production, buildroot ] {% endmacro %}