Skip to content

Commit

Permalink
phase1: remove kmods in target packages if archive is enabled
Browse files Browse the repository at this point in the history
OPKG gets confused if kmod packages are present in both, target packages
as well as kernel version specific folder.
Remove them from target packages to make opkg pick the kmods from kmod
archive folder only.

Also add an additional step to remove any kmod entry from sha256sums.

Signed-off-by: Daniel Golle <[email protected]>
[ rework implementation, sha256sumsclean + --remove-source-files ]
Signed-off-by: Christian Marangi <[email protected]>
  • Loading branch information
dangowrt authored and Ansuel committed Nov 5, 2024
1 parent d014e42 commit 25d364a
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion phase1/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -1303,10 +1303,11 @@ def prepareFactory(target):
factory.addStep(
ShellCommand(
name="kmodprepare",
description="Preparing kmod archive",
description="Preparing kmod archive (move kmods)",
descriptionDone="Kmod archive prepared",
command=[
"rsync",
"--remove-source-files",
"--include=/kmod-*.ipk",
"--include=/kmod-*.apk",
"--exclude=*",
Expand Down Expand Up @@ -1350,6 +1351,26 @@ def prepareFactory(target):
)
)

factory.addStep(
ShellCommand(
name="sha256sumsclean",
description="Removing kmods from sha256sums",
descriptionDone="Kmods removed",
command=[
"sed",
"-i",
"/ \\*packages\\/kmod-.*$/d",
Interpolate(
"bin/targets/%(kw:target)s/%(kw:subtarget)s%(prop:libc)s/sha256sums",
target=target,
subtarget=subtarget,
),
],
haltOnFailure=True,
doStepIf=IsKmodArchiveEnabled,
)
)

# sign
factory.addStep(
MasterShellCommand(
Expand Down

0 comments on commit 25d364a

Please sign in to comment.