func cachedStore(s *state.State) StoreService { ubuntuStore := s.Cached(cachedStoreKey{}) if ubuntuStore == nil { return nil } return ubuntuStore.(StoreService) }
func cachedDB(s *state.State) *asserts.Database { db := s.Cached(cachedDBKey{}) if db == nil { panic("internal error: needing an assertion database before the assertion manager is initialized") } return db.(*asserts.Database) }