Skip to content

Commit

Permalink
Add patches support for buildroot
Browse files Browse the repository at this point in the history
  • Loading branch information
AMDmi3 committed Aug 23, 2023
1 parent 1a9b3b4 commit 64ad5f9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions repology/parsers/parsers/buildroot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 7 additions & 2 deletions repos.d/buildroot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Buildroot
###########################################################################
{% macro buildroot(branch) %}
{% set branchparam = '?h=' + branch if branch != 'master' else '' %}
- name: buildroot_{{branch}}
type: repository
desc: Buildroot {{branch}}
Expand All @@ -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 %}

Expand Down

0 comments on commit 64ad5f9

Please sign in to comment.