Skip to content

Commit

Permalink
Update keywords to reflect inclusive language standards
Browse files Browse the repository at this point in the history
  • Loading branch information
beeankha committed Apr 23, 2024
1 parent 461b26d commit 1f6c22b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
1 change: 1 addition & 0 deletions conda_build/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,7 @@ def parse(data, config, path=None):
"post-link": str,
"pre-unlink": str,
"missing_dso_whitelist": None,
"missing_dso_allowlist": None, # preferred keyword for inclusive language
"error_overdepending": None,
"error_overlinking": None,
"overlinking_ignore_patterns": [],
Expand Down
18 changes: 13 additions & 5 deletions conda_build/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ def _lookup_in_sysroots_and_allowlist(
if not in_allowlist and not in_sysroots:
_print_msg(
errors,
f"{msg_prelude}: {needed_dso} not found in packages, sysroot(s) nor the missing_dso_whitelist.\n"
f"{msg_prelude}: {needed_dso} not found in packages, sysroot(s) nor the missing_dso_allowlist.\n"
".. is this binary repackaging?",
verbose=verbose,
)
Expand Down Expand Up @@ -1157,6 +1157,7 @@ def _show_linking_messages(
pkg_name,
error_overlinking,
runpath_whitelist,
rpath_allowlist, # preferred keyword for inclusive language
verbose,
requirements_run,
lib_packages,
Expand Down Expand Up @@ -1193,7 +1194,9 @@ def _show_linking_messages(
)
continue
if runpaths and not (
runpath_whitelist or any(fnmatch(f, w) for w in runpath_whitelist)
runpath_whitelist
or rpath_allowlist
or any(fnmatch(f, w) for w in runpath_whitelist or rpath_allowlist)
):
_print_msg(
errors,
Expand Down Expand Up @@ -1256,7 +1259,9 @@ def check_overlinking_impl(
run_prefix,
build_prefix,
missing_dso_whitelist,
missing_dso_allowlist, # preferred keyword for inclusive language
runpath_whitelist,
rpath_allowlist, # preferred keyword for inclusive language
error_overlinking,
error_overdepending,
verbose,
Expand Down Expand Up @@ -1360,7 +1365,7 @@ def check_overlinking_impl(
allowlist = DEFAULT_WIN_ALLOWLIST
build_is_host = True if on_win else False

allowlist += missing_dso_whitelist or []
allowlist += missing_dso_whitelist or missing_dso_allowlist or []

# Sort the sysroots by the number of files in them so things can assume that
# the first sysroot is more important than others.
Expand Down Expand Up @@ -1473,6 +1478,7 @@ def check_overlinking_impl(
pkg_name,
error_overlinking,
runpath_whitelist,
rpath_allowlist, # preferred keyword for inclusive language
verbose,
requirements_run,
lib_packages,
Expand Down Expand Up @@ -1563,8 +1569,10 @@ def check_overlinking(m: MetaData, files, host_prefix=None):
[req.split(" ")[0] for req in m.get_value("requirements/host", [])],
host_prefix or m.config.host_prefix,
m.config.build_prefix,
m.get_value("build/missing_dso_whitelist", []),
m.get_value("build/runpath_whitelist", []),
m.get_value(
("build/missing_dso_whitelist" or "build/missing_dso_allowlist"), []
),
m.get_value(("build/runpath_whitelist" or "build/rpath_allowlist"), []),
m.config.error_overlinking,
m.config.error_overdepending,
m.config.verbose,
Expand Down
2 changes: 1 addition & 1 deletion conda_build/skeletons/rpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
build:
number: 2
noarch: generic
missing_dso_whitelist:
missing_dso_allowlist:
- '*'
{depends}
Expand Down
8 changes: 4 additions & 4 deletions docs/source/resources/define-metadata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ Use this sparingly, as the overlinking checks generally do prevent you from maki
Allowlisting shared libraries
-----------------------------

The ``missing_dso_whitelist`` build key is a list of globs for
The ``missing_dso_allowlist`` build key is a list of globs for
dynamic shared object (DSO) files that should be ignored when
examining linkage information.

Expand All @@ -923,20 +923,20 @@ or error ``--error-overlinking`` will result.
.. code-block:: yaml
build:
missing_dso_whitelist:
missing_dso_allowlist:
These keys allow additions to the list of allowed libraries.

The ``runpath_whitelist`` build key is a list of globs for paths
The ``rpath_allowlist`` build key is a list of globs for paths
which are allowed to appear as runpaths in the package's shared
libraries. All other runpaths will cause a warning message to be
printed during the build.

.. code-block:: yaml
build:
runpath_whitelist:
rpath_allowlist:
.. _requirements:
Expand Down

0 comments on commit 1f6c22b

Please sign in to comment.