(ctx context.Context, writable bool)
| 20 | } |
| 21 | |
| 22 | func NewRepoConfig(ctx context.Context, writable bool) *RepoConfig { |
| 23 | pkgCacheConfig := ctx.PkgCacheConfig() |
| 24 | if pkgCacheConfig == nil || pkgCacheConfig.GetDir(context.PkgCacheDirRoot) == "" { |
| 25 | return nil |
| 26 | } |
| 27 | |
| 28 | return &RepoConfig{ |
| 29 | ctx: ctx, |
| 30 | writable: writable, |
| 31 | chattrFS: fileio.NewChattrFS(pkgCacheConfig.GetDir(context.PkgCacheDirRoot)), |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | // Store packs a source tree into repo cache. |
| 36 | // - for archive sources, repoDir is the source dir in buildtrees. |