Skip to content

Commit

Permalink
Set RPM_PLUGINDIR in top level CMakeLists.txt
Browse files Browse the repository at this point in the history
We have in macros.in:
  %__plugindir          @RPM_PLUGINDIR@

This means, if RPM_PLUGINDIR is not set, %__plugindir will be empty.
This in turn results in error message when running 'dnf'.

e.g.,
dnf --help >/dev/null
error: /usr/lib64/rpm/macros: line 1183: Macro %__plugindir has empty body
error: /usr/lib64/rpm/macros: line 1183: Macro %__plugindir has empty body

So we should move this directory setting into the top level CMakeLists.txt.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
  • Loading branch information
ChenQi1989 authored and ffesti committed Jan 7, 2025
1 parent 4d621e4 commit cae8ef5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,9 @@ if (ENABLE_PYTHON)
add_subdirectory(python)
endif()

set(RPM_PLUGINDIR ${CMAKE_INSTALL_FULL_LIBDIR}/rpm-plugins
CACHE PATH "rpm plugin directory")

if (ENABLE_PLUGINS)
add_subdirectory(plugins)
endif()
Expand Down
3 changes: 0 additions & 3 deletions plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ if (HAVE_UNSHARE)
add_library(unshare MODULE unshare.c)
endif()

set(RPM_PLUGINDIR ${CMAKE_INSTALL_FULL_LIBDIR}/rpm-plugins
CACHE PATH "rpm plugin directory")

get_property(plugins DIRECTORY PROPERTY BUILDSYSTEM_TARGETS)
foreach(plugin ${plugins})
target_link_libraries(${plugin} PRIVATE librpmio librpm ${Intl_LIBRARIES})
Expand Down

0 comments on commit cae8ef5

Please sign in to comment.