Bug 438186 - kfilemetadata: Executable ExternalExtractors are ignored, contrary to the documentation.
Summary: kfilemetadata: Executable ExternalExtractors are ignored, contrary to the doc...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kfilemetadata
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 5.82.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Pinak Ahuja
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-06 21:02 UTC by Pat Thoyts
Modified: 2023-11-12 20:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pat Thoyts 2021-06-06 21:02:31 UTC
SUMMARY

Commit 73da9a53cb added code to extractorcollection.cpp that skips files that are not libraries. However, this library is supposed to support executable files in the libexec/kf5/kfilemetadata/externalextractors subdirectories. The commit mentioned above skips all such files so no executable external extractor is ever recognised. Inverting the logic when checking for external extractors (line 114) enables the use of such executable files

STEPS TO REPRODUCE
1. Create a folder under libexec/kf5/kfilemetadata/externalextractors (eg testextractor) and add a manifest.json and an executable shell script or python program.
2. Run QT_LOGGING_RULES="*.debug=true" ./bin/dump path/to/some/file
3. Look for the output of the extractor or for it to have been located in the debug output 

OBSERVED RESULT

The external extractor is not found and not called.

EXPECTED RESULT

The external extractor is called as documented.

SOFTWARE/OS VERSIONS
Windows: not tested
macOS: not tested
Linux/KDE Plasma: KDE neon User Edition 5.21
(available in About System)
KDE Plasma Version: 5.21.5
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION

Probably broken since 5.76.0 but I've only tested 5.82.0
Comment 1 Bug Janitor Service 2021-06-06 21:13:00 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kfilemetadata/-/merge_requests/29