Resolve all symlinks in ldcache

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2023-04-14 13:55:32 +02:00
parent 46c1c45d85
commit fc7c8f7520
3 changed files with 4 additions and 6 deletions

View File

@ -5,6 +5,7 @@
* Update `update-ldcache` hook to only update ldcache if it exists.
* Update `update-ldcache` hook to create `/etc/ld.so.conf.d` folder if it doesn't exist.
* Fix failure when libcuda cannot be located during XOrg library discovery.
* Fix CDI spec generation on systems that use `/etc/alternatives` (e.g. Debian)
## v1.13.0

View File

@ -307,11 +307,7 @@ func (c *ldcache) resolve(target string) (string, error) {
link = filepath.Join(filepath.Dir(target), link)
}
// Ensure that the returned path is relative to the root.
link = filepath.Join(c.root, link)
c.logger.Debugf("Resolved link: '%v' => '%v'", name, link)
return link, nil
return c.resolve(link)
}
// bytesToString converts a byte slice to a string.

View File

@ -94,7 +94,8 @@ func (l *cudaLocator) Locate(pattern string) ([]string, error) {
"/usr/lib64",
"/usr/lib/x86_64-linux-gnu",
"/usr/lib/aarch64-linux-gnu",
"/usr/lib/current",
"/usr/lib/x86_64-linux-gnu/nvidia/current",
"/usr/lib/aarch64-linux-gnu/nvidia/current",
),
lookup.WithCount(1),
)