KF5I18NMacros: Don't install an empty dir when no po files exist
ClosedPublic

Authored by heikobecker on May 15 2018, 7:28 PM.

Details

Summary

I saw this happen with kdecoration from git since
64d9f92f6a8708814f414dda0bb0d0e91c27235f. The directory passed in
its ki18n_install call doesn't exist, resulting in an empty
directory (LOCALE_INSTALL_DIR) getting installed, which at least
some packaging systems don't like.

Test Plan

Tested with kdecoration from git and tarballs where podir
exists

Diff Detail

Repository
R249 KI18n
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
heikobecker created this revision.May 15 2018, 7:28 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptMay 15 2018, 7:28 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
heikobecker requested review of this revision.May 15 2018, 7:28 PM
ltoscano added a subscriber: ltoscano.

Looks fine by me, let's see if there are other comments.

cmake/KF5I18NMacros.cmake.in
138–141

I guess that those two lines are the critical parts (the call to file), but probably it's not bad to avoid processing other instructions too.

heikobecker marked an inline comment as done.Jun 7 2018, 12:38 PM

Considering the feedback I'll probably merge this in a few days if no objections turn up in the meantime.

cmake/KF5I18NMacros.cmake.in
138–141

Yes. And that was my thought as well and reason to move the rest inside the if

ltoscano accepted this revision.Jun 7 2018, 12:46 PM
This revision is now accepted and ready to land.Jun 7 2018, 12:46 PM
This revision was automatically updated to reflect the committed changes.
heikobecker marked an inline comment as done.