Skip to content

Commit 64ad5f9

Browse files
committed
Add patches support for buildroot
1 parent 1a9b3b4 commit 64ad5f9

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

repology/parsers/parsers/buildroot.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,8 @@ def iter_parse(self, path: str, factory: PackageFactory) -> Iterable[PackageMake
4242
cpe_components = cpeid.split(':')
4343
pkg.add_cpe(cpe_components[3], cpe_components[4])
4444

45+
pkg.set_extra_field('pkg_path', pkgdata['pkg_path'])
46+
if patch_files := pkgdata['patch_files']:
47+
pkg.set_extra_field('patch', patch_files)
48+
4549
yield pkg

repos.d/buildroot.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Buildroot
33
###########################################################################
44
{% macro buildroot(branch) %}
5+
{% set branchparam = '?h=' + branch if branch != 'master' else '' %}
56
- name: buildroot_{{branch}}
67
type: repository
78
desc: Buildroot {{branch}}
@@ -22,9 +23,13 @@
2223
url: https://git.busybox.net/buildroot/
2324
packagelinks:
2425
- type: PACKAGE_RECIPE
25-
url: https://git.busybox.net/buildroot/tree/{path}?h={{branch}}
26+
url: https://git.busybox.net/buildroot/tree/{path}{{branchparam}}
2627
- type: PACKAGE_RECIPE_RAW
27-
url: https://git.busybox.net/buildroot/plain/{path}?h={{branch}}
28+
url: https://git.busybox.net/buildroot/plain/{path}{{branchparam}}
29+
- type: PACKAGE_PATCH
30+
url: https://git.busybox.net/buildroot/tree/{pkg_path}/{?patch}{{branchparam}}
31+
- type: PACKAGE_PATCH_RAW
32+
url: https://git.busybox.net/buildroot/plain/{pkg_path}/{?patch}{{branchparam}}
2833
groups: [ all, production, buildroot ]
2934
{% endmacro %}
3035

0 commit comments

Comments
 (0)