From 76c657177dfabd69a867d9677f6305fcc142b4b6 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 26 Jan 2026 21:56:09 +0900 Subject: internal/rosa: patch ignore whitespace This makes it work better with patches emitted by git. Signed-off-by: Ophestra --- internal/rosa/rosa.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'internal/rosa/rosa.go') diff --git a/internal/rosa/rosa.go b/internal/rosa/rosa.go index 312e16b1..df1ed9f8 100644 --- a/internal/rosa/rosa.go +++ b/internal/rosa/rosa.go @@ -275,7 +275,7 @@ ln -vs ../usr/bin /work/bin // NewPatchedSource returns [pkg.Artifact] of source with patches applied. If // passthrough is true, source is returned as is for zero length patches. func (t Toolchain) NewPatchedSource( - name string, + name, version string, source pkg.Artifact, passthrough bool, patches ...[2]string, @@ -293,13 +293,18 @@ func (t Toolchain) NewPatchedSource( } paths[0] = pkg.Path(AbsUsrSrc.Append(name), false, source) - aname := name + "-src" + aname := name + "-" + version + "-src" script := ` cp -r /usr/src/` + name + `/. /work/. chmod -R +w /work && cd /work ` if len(paths) > 1 { - script += `cat /usr/src/` + name + `-patches/* | patch -p 1` + script += ` +cat /usr/src/` + name + `-patches/* | \ + patch \ + -p 1 \ + --ignore-whitespace +` aname += "-patched" } return t.New(aname, stage3Concat(t, []pkg.Artifact{}, -- cgit v1.3.1