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 Jun 17, 2024
1 parent 44ed9a3 commit 0ac98da
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 @@ -1289,10 +1289,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",
"--exclude=*",
"-va",
Expand Down Expand Up @@ -1335,6 +1336,26 @@ def prepareFactory(target):
)
)

factory.addStep(
ShellCommand(
name="sha256sumsclean",
description="Removing kmods from sha256sums",
descriptionDone="Kmods removed",
command=[
"sed",
"-i",
r "\# *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 0ac98da

Please sign in to comment.