diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-01-26 21:56:09 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-01-26 21:56:36 +0900 |
| commit | 76c657177dfabd69a867d9677f6305fcc142b4b6 (patch) | |
| tree | ecb425260b37c3809657289fb478bf619d6a655f /internal/rosa/rosa.go | |
| parent | 4356f978aa32d903b70f8408375a609091eb0ddb (diff) | |
internal/rosa: patch ignore whitespace
This makes it work better with patches emitted by git.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/rosa.go')
| -rw-r--r-- | internal/rosa/rosa.go | 11 |
1 files changed, 8 insertions, 3 deletions
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{}, |
