Skip to content

Commit

Permalink
Merge pull request #195306 from adisbladis/autopatchelf-globs
Browse files Browse the repository at this point in the history
  • Loading branch information
lovesegfault authored Oct 10, 2022
2 parents 8c7813e + 01535ff commit 0b21851
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions pkgs/build-support/setup-hooks/auto-patchelf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import pprint
import subprocess
import sys
from fnmatch import fnmatch
from collections import defaultdict
from contextlib import contextmanager
from dataclasses import dataclass
Expand Down Expand Up @@ -265,8 +266,10 @@ def auto_patchelf(
print(f"auto-patchelf: {len(missing)} dependencies could not be satisfied")
failure = False
for dep in missing:
if dep.name.name in ignore_missing or "*" in ignore_missing:
print(f"warn: auto-patchelf ignoring missing {dep.name} wanted by {dep.file}")
for pattern in ignore_missing:
if fnmatch(dep.name.name, pattern):
print(f"warn: auto-patchelf ignoring missing {dep.name} wanted by {dep.file}")
break
else:
print(f"error: auto-patchelf could not satisfy dependency {dep.name} wanted by {dep.file}")
failure = True
Expand Down
2 changes: 1 addition & 1 deletion pkgs/build-support/setup-hooks/auto-patchelf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ autoPatchelf() {
esac
done

local ignoreMissingDepsArray=($autoPatchelfIgnoreMissingDeps)
readarray -td' ' ignoreMissingDepsArray < <(echo -n "$autoPatchelfIgnoreMissingDeps")
if [ "$autoPatchelfIgnoreMissingDeps" == "1" ]; then
echo "autoPatchelf: WARNING: setting 'autoPatchelfIgnoreMissingDeps" \
"= true;' is deprecated and will be removed in a future release." \
Expand Down

0 comments on commit 0b21851

Please sign in to comment.