Skip to content

Only generate update ldcache hook if libraries are discovered #373

Description

@elezar

In the following:

// Hooks checks the required mounts for libraries and returns a hook to update the LDcache for the discovered paths.
func (d ldconfig) Hooks() ([]Hook, error) {
	mounts, err := d.mountsFrom.Mounts()
	if err != nil {
		return nil, fmt.Errorf("failed to discover mounts for ldcache update: %v", err)
	}
	h := CreateLDCacheUpdateHook(
		d.nvidiaCTKPath,
		d.ldconfigPath,
		getLibraryPaths(mounts),
	)
	return []Hook{h}, nil
}

we should not construct a hook if the list of mounts (or libraries) are empty.

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions