Skip to content
Snippets Groups Projects
Commit 702fc558 authored by Simon McVittie's avatar Simon McVittie
Browse files

Revert "WIP: capture-libs: Treat unversioned libraries as in indeterminate order"


This reverts commit faf3daa9, which
was merged with an outdated commit message.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent faf3daa9
No related branches found
No related tags found
1 merge request!311Build capsule-capture-libs from a bundled copy of libcapsule
...@@ -356,41 +356,6 @@ library_cmp_by_name( const char *soname, ...@@ -356,41 +356,6 @@ library_cmp_by_name( const char *soname,
"\"%s\" from \"%s\"", "\"%s\" from \"%s\"",
soname, left_basename, left_from, right_basename, right_from ); soname, left_basename, left_from, right_basename, right_from );
if( strcmp( left_basename, right_basename ) == 0 )
{
DEBUG( DEBUG_TOOL,
"Name of %s \"%s\" from \"%s\" compares the same as "
"\"%s\" from \"%s\"",
soname, left_basename, left_from, right_basename, right_from );
return 0;
}
if( strcmp( soname, left_basename ) == 0 )
{
/* In some distributions (Debian, Ubuntu, Manjaro)
* libgcc_s.so.1 is a plain file, not a symlink to a
* version-suffixed version. We cannot know just from the name
* whether that's older or newer, so assume equal. The caller is
* responsible for figuring out which one to prefer. */
DEBUG( DEBUG_TOOL,
"Unversioned %s \"%s\" from \"%s\" cannot be compared with "
"\"%s\" from \"%s\"",
soname, left_basename, left_from,
right_basename, right_from );
return 0;
}
if( strcmp( soname, right_basename ) == 0 )
{
/* The same, but the other way round */
DEBUG( DEBUG_TOOL,
"%s \"%s\" from \"%s\" cannot be compared with "
"unversioned \"%s\" from \"%s\"",
soname, left_basename, left_from,
right_basename, right_from );
return 0;
}
return ( strverscmp( left_basename, right_basename ) ); return ( strverscmp( left_basename, right_basename ) );
} }
...@@ -524,12 +489,6 @@ capture_one( const char *soname, capture_flags flags, ...@@ -524,12 +489,6 @@ capture_one( const char *soname, capture_flags flags,
{ {
const char *needed_path_in_container = container.needed[0].path; const char *needed_path_in_container = container.needed[0].path;
/* TODO: Ideally we would actually dlopen the libraries and
* inspect their symbol tables, either in ambiguous cases
* or always - but that's easier said than done, because
* private symbols exist. For now we just use
* library_cmp_by_name(). */
/* If equal, we prefer the provider over the container */ /* If equal, we prefer the provider over the container */
if( library_cmp_by_name( needed_name, if( library_cmp_by_name( needed_name,
needed_path_in_container, needed_path_in_container,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment