MCPcopy Create free account
hub / github.com/celer-pkg/celer / CheckHostSupported

Method CheckHostSupported

configs/port_pkgcache.go:279–292  ·  view source on GitHub ↗

CheckHostSupported Host supported means that the port can be built natively.

(nameVersion string)

Source from the content-addressed store, hash-verified

277
278// CheckHostSupported Host supported means that the port can be built natively.
279func (p Port) CheckHostSupported(nameVersion string) bool {
280 if v, ok := hostSupportedCache.Load(nameVersion); ok {
281 return v.(bool)
282 }
283
284 var port = Port{DevDep: true}
285 if err := port.Init(p.ctx, nameVersion); err != nil {
286 return false
287 }
288
289 supported := port.IsHostSupported()
290 hostSupportedCache.Store(nameVersion, supported)
291 return supported
292}
293
294func (p Port) toPkgCacheBuildConfig(buildConfig *buildsystems.BuildConfig, portFile string) pkgcache.BuildConfig {
295 return pkgcache.BuildConfig{

Callers 1

preWarmMetaCacheMethod · 0.95

Calls 3

IsHostSupportedMethod · 0.80
InitMethod · 0.65
StoreMethod · 0.65

Tested by

no test coverage detected