diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-11-26 20:43:16 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-11-27 00:36:46 +0900 |
| commit | 645cd94efc970b7ecacefc29fe78153608ade11d (patch) | |
| tree | 37aa2d130777774d9750b170744ec6a17e8c61ca /internal/rosa/rosa.go | |
| parent | fe25e7f1d85422c4eae8204c24a5057e15734eb5 (diff) | |
internal/rosa: remove /usr/src
There is only one primary source directory per package, so naming the
directory after the package makes little sense, and introduces many
complications and ugliness of having to refer to their own name. This
change also moves extras to /extra, preserving the relative pathnames.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/rosa.go')
| -rw-r--r-- | internal/rosa/rosa.go | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/internal/rosa/rosa.go b/internal/rosa/rosa.go index 22dbcd6d..3d4914f2 100644 --- a/internal/rosa/rosa.go +++ b/internal/rosa/rosa.go @@ -53,11 +53,13 @@ const ( ) var ( - // AbsUsrSrc is the conventional directory to place source code under. - AbsUsrSrc = fhs.AbsUsr.Append("src") - // AbsSystem is the Rosa OS installation prefix. AbsSystem = fhs.AbsRoot.Append(prefixR) + + // AbsSource is the directory to place source code under. + AbsSource = fhs.AbsRoot.Append("source") + // AbsExtra holds extra files provided to a packaging container. + AbsExtra = fhs.AbsRoot.Append("extra") ) // TargetError is an unsupported target architecture name. @@ -631,9 +633,7 @@ func (t Toolchain) New( dir == "" || attr.ScriptEarly != "" || helperScriptEarly != "" { - scriptEarly += ` -cd '/usr/src/` + name + `/' -` + scriptEarly += "\ncd /source/\n" } scriptEarly += attr.ScriptEarly + helperScriptEarly if dir != "" && dir != helperInPlace { @@ -648,9 +648,7 @@ cd '/usr/src/` + name + `/' paths := attr.Paths if source != nil { paths = slices.Concat(attr.Paths, []pkg.ExecPath{ - pkg.Path(AbsUsrSrc.Append( - name, - ), attr.Writable || wantsWrite, t.NewPatchedSource( + pkg.Path(AbsSource, attr.Writable || wantsWrite, t.NewPatchedSource( rn, source, !attr.Chmod && !wantsChmod, attr.Patches..., )), }) |
