From 2478bb144d69037250cd8d2e6e0a827a8582671f Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Sun, 19 Feb 2017 03:48:22 +0530 Subject: [PATCH] rpm: We no longer provide the full path to a library Ever since we changed how we do library searching, the full path to the library has not been available under `.fullpath`. This has been broken for at least a year... --- mesonbuild/dependencies.py | 3 +++ mesonbuild/interpreter.py | 3 --- mesonbuild/modules/rpm.py | 7 ++++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/mesonbuild/dependencies.py b/mesonbuild/dependencies.py index 5997611f4..e4317f1e1 100644 --- a/mesonbuild/dependencies.py +++ b/mesonbuild/dependencies.py @@ -564,6 +564,9 @@ class ExternalLibrary(Dependency): def found(self): return self.is_found + def get_name(self): + return self.name + def get_link_args(self): return self.link_args diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index bae42a42f..d6cc921c6 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -308,9 +308,6 @@ class ExternalLibraryHolder(InterpreterObject): def found_method(self, args, kwargs): return self.found() - def get_filename(self): - return self.held_object.fullpath - def get_name(self): return self.held_object.name diff --git a/mesonbuild/modules/rpm.py b/mesonbuild/modules/rpm.py index b967863ba..bbfeaa06d 100644 --- a/mesonbuild/modules/rpm.py +++ b/mesonbuild/modules/rpm.py @@ -98,11 +98,12 @@ class RPMModule(ExtensionModule): for dep in state.environment.coredata.deps: fn.write('BuildRequires: pkgconfig(%s)\n' % dep[0]) for lib in state.environment.coredata.ext_libs.values(): - fn.write('BuildRequires: %s # FIXME\n' % lib.fullpath) - mlog.warning('replace', mlog.bold(lib.fullpath), 'with real package.', + name = lib.get_name() + fn.write('BuildRequires: {} # FIXME\n'.format(name)) + mlog.warning('replace', mlog.bold(name), 'with the real package.', 'You can use following command to find package which ' 'contains this lib:', - mlog.bold('dnf provides %s' % lib.fullpath)) + mlog.bold("dnf provides '*/lib{}.so".format(name)) for prog in state.environment.coredata.ext_progs.values(): if not prog.found(): fn.write('BuildRequires: %%{_bindir}/%s # FIXME\n' %