Fix jenkins build of kajongg
AbandonedPublic

Authored by aacid on Aug 17 2019, 12:45 PM.

Details

Reviewers
jjazeix
Group Reviewers
KDE Games
Summary

Following a mail on breaked jenkins builds, I took a look on the kajongg one.
The issue is due to the fact that there are spaces in the source folder: "/home/jenkins/workspace/Applications/kajongg/kf5-qt5 SUSEQt5.12" and cmake does not like spaces for rule names.

Test Plan

Clone the source in a folder with a space in it. Compile before the change and see it does not work.
Compile after the change and see it compiles fine.

Diff Detail

Repository
R387 Kajongg
Lint
Lint Skipped
Unit
Unit Tests Skipped
jjazeix created this revision.Aug 17 2019, 12:45 PM
Restricted Application added a reviewer: KDE Games. · View Herald TranscriptAug 17 2019, 12:45 PM
Restricted Application added a subscriber: kde-games-devel. · View Herald Transcript
jjazeix requested review of this revision.Aug 17 2019, 12:45 PM
jjazeix updated this revision to Diff 63920.EditedAug 17 2019, 1:02 PM

This one should also fix https://bugs.kde.org/show_bug.cgi?id=376303
No need to have a full path one the rule name, it's not used elsewhere.

It might be a good idea to harden this fix further:

  1. The file name could potentially have spaces in it. So, a simple (string(REPLACE ...)) for spaces with underscores should fix that (see D23233).
  2. Instead of using the full path, we could use the path relative to the current source directory (file(RELATIVE_PATH ...)) to get a unique target name. Another option would be to check (if(TARGET ...)) and add a numeric suffix as needed. Both would handle the case where the project has the same filename in two different paths. This will still fix bug 376303 by creating shorter target names.
jjazeix updated this revision to Diff 64015.Aug 19 2019, 6:08 AM

Replace spaces by underscores
Use relative filename instead of just filename to avoid duplicates target name rules

That's a winner. I'll mark D23233 as abandoned so this fix can proceed.

It's pushed on master and works fine: https://build.kde.org/job/Applications/job/kajongg/
Should I cherry-pick it to stable branch?
I can't close the revision too (maybe missing an approval?)

It's pushed on master and works fine: https://build.kde.org/job/Applications/job/kajongg/
Should I cherry-pick it to stable branch?
I can't close the revision too (maybe missing an approval?)

No, the reason is different: the format of the commit message does not contain the expected line at the end. See how the other commit messages produced by arc(anist) are formatted.

Thanks for landing this. If we could get this deployed to the stable branch as well (given it's a build fix) that would be fantastic.

Thanks for landing this. If we could get this deployed to the stable branch as well (given it's a build fix) that would be fantastic.

It's done and it compiles fine :)

aacid added a subscriber: aacid.Aug 20 2019, 5:51 PM

I'll close it manually

aacid commandeered this revision.Aug 20 2019, 5:51 PM
aacid abandoned this revision.
aacid added a reviewer: jjazeix.