https://bugs.kde.org/show_bug.cgi?id=463598

            Bug ID: 463598
           Summary: External plugins are not found, findPlugins used by
                    findExtractors only searches for files/libraries
    Classification: Frameworks and Libraries
           Product: frameworks-kfilemetadata
           Version: 5.101.0
          Platform: Gentoo Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: pinak.ah...@gmail.com
          Reporter: gabemarc...@yahoo.com
  Target Milestone: ---

SUMMARY
***
External plugins are not found by kfilemetadata. I did some digging, and it
turns out that the current implementation in
`ExtractorCollectionPrivate::findExtractors` for external plugins relies on
`KPluginMetaData::findPlugins`, which uses
`KPluginMetaDataPrivate::forEachPlugin` which only searches for files, and
these files must be libraries.
***


STEPS TO REPRODUCE
1. Compile kfilemetadata and kcoreaddons with debugging symbols and install
them
2. Install an external plugin at
libexec/kf5/kfilemetadata/externalextractors/test/ (on my system, this is at
`/usr/lib64/libexec/kf5/kfilemetadata/externalextractors/test/`)
2. gdb --args /usr/bin/baloo_filemetadata_temp_extractor
[some-audio-file-as-an-example]
3. Place a breakpoint at `ExtractorCollectionPrivate::findExtractors`  and
`KPluginMetaDataPrivate::forEachPlugin` 

OBSERVED RESULT
When trying to find external plugins, `KPluginMetaDataPrivate::forEachPlugin`
skips over these are they aren't files (`QDirIterator it(dir, QDir::Files);`)
nor libraries (`if (QLibrary::isLibrary(it.fileName())) {`.

EXPECTED RESULT
The kfilemetadata implementation uses something else to find external plugins
so that they are found by `ExtractorCollectionPrivate::findExtractors`

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo Linux
(available in About System)
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7

ADDITIONAL INFORMATION
Let me know if you need additional information, but this should be fairly easy
to reproduce. The new-ish `KPluginMetaData::findPlugins` support from
KPluginMetaData doesn't have a concept for external plugins-- not sure if
that's intentional or a bug. In any case, currently, it assumes all plugins are
files and libraries, which explains why the current kfilemetadata
implementation fails to find any external libraries, as these are in
directories, and are not libraries.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to