mirror of
https://github.com/mudler/luet.git
synced 2025-09-18 16:32:16 +00:00
Add support for local packages cache
This commit is contained in:
@@ -42,3 +42,18 @@ func GetSystemRepoDatabaseDirPath() string {
|
||||
}
|
||||
return dbpath
|
||||
}
|
||||
|
||||
func GetSystemPkgsCacheDirPath() (ans string) {
|
||||
cachepath := "packages"
|
||||
if config.LuetCfg.GetSystem().PkgsCachePath != "" {
|
||||
cachepath = config.LuetCfg.GetSystem().PkgsCachePath
|
||||
}
|
||||
|
||||
if filepath.IsAbs(cachepath) {
|
||||
ans = cachepath
|
||||
} else {
|
||||
ans = filepath.Join(GetSystemRepoDatabaseDirPath(), cachepath)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user