Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 646264 - [kde overlay] kde-plasma/plasma-workspace-9999 and kde-plasma/kde-cli-tools-9999 need testing-optional patch
Summary: [kde overlay] kde-plasma/plasma-workspace-9999 and kde-plasma/kde-cli-tools-9...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Overlays (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-01 04:44 UTC by Duncan
Modified: 2018-02-18 13:35 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
plasma-workspace-notification-tests-optional (file_646264.txt,665 bytes, patch)
2018-02-01 04:44 UTC, Duncan
Details | Diff
kde-cli-tools-keditfiletype-test-optional (kde-cli-tools.keditfiletype.testoptional.patch,345 bytes, patch)
2018-02-15 06:15 UTC, Duncan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan 2018-02-01 04:44:30 UTC
Created attachment 517338 [details, diff]
plasma-workspace-notification-tests-optional

As of upstream merge-commit f86a2ed53, plasma-workspace-9999 built without FEATURES=testing is failing with:

-- Configuring done
CMake Error at dataengines/notifications/CMakeLists.txt:36 (add_executable):
  Target "notification_test" links to target "Qt5::Test" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?


But I recalled filing a gentoo bug (#630562) on a similar error (kio-extras there) and looked it up to see if I could apply a similar fix here, based on the CMakeLists.txt diff.

Sure enough.  Dropping the following in portage's patches dir allowed plasma-workspace to build again. =:^)

Note that it's a blind patch as I'm not familiar enough with the build method to /know/ that plasma-workspace uses the same BUILD_TESTING var, so it might not properly /activate/ tests when it should, but it does /deactivate/ them when they should be.  =:^)

This should go upstream but I don't have a phab account and bugs I file upstream, even on live-git, get ignored for months, often making them practically impossible to trace and fix, when if they responded when I actually filed, it'd be only a few days worth of commits as potential culprits.  Oh, well...

(Pasting as attachment too, in case it's munged inline.)

--- a/dataengines/notifications/CMakeLists.txt  2018-01-31 19:54:26.608634042 -0700
+++ b/dataengines/notifications/CMakeLists.txt  2018-01-31 21:00:17.040830824 -0700
@@ -33,6 +33,8 @@ install(FILES notifications.operations D
 
 #unit test
 
-add_executable(notification_test  notificationsanitizer.cpp notifications_test.cpp)
-target_link_libraries(notification_test Qt5::Test Qt5::Core)
-ecm_mark_as_test(notification_test)
+if(BUILD_TESTING)
+    add_executable(notification_test  notificationsanitizer.cpp notifications_test.cpp)
+    target_link_libraries(notification_test Qt5::Test Qt5::Core)
+    ecm_mark_as_test(notification_test)
+endif()
Comment 1 Duncan 2018-02-15 05:25:36 UTC
Comment on attachment 517338 [details, diff]
plasma-workspace-notification-tests-optional

I'd say different package, different bug, but that'd be arguing with the  @gentoo that renamed the bug, so... rename the existing patch to reflect the package it applies to, instead.

Upstream kde-cli-tools hasn't fixed the upstream bug since the rename, either.  That one appears to be just an unconditional include of the tests subdir, so should be easy to fix.  I intend to attach a patch for it later tonite after finding the culprit upstream commit and testing the patch locally.
Comment 2 Duncan 2018-02-15 06:15:51 UTC
Created attachment 519596 [details, diff]
kde-cli-tools-keditfiletype-test-optional

OK, here's the kde-cli-tools patch, tested to allow build with testing off.  Culprit upstream commit is f21b9ab7c.
Comment 3 Larry the Git Cow gentoo-dev 2018-02-18 13:35:32 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/kde.git/commit/?id=9f9c8f1d1421c5259044c09146408a33cd83f669

commit 9f9c8f1d1421c5259044c09146408a33cd83f669
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2018-02-18 13:34:21 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2018-02-18 13:34:21 +0000

    kde-plasma/kde-cli-tools: Fix build w/o tests
    
    Thanks-to: Duncan <1i5t5.duncan@cox.net>
    Closes: https://bugs.gentoo.org/646264
    Package-Manager: Portage-2.3.24, Repoman-2.3.6

 .../files/kde-cli-tools-5.12.80-tests-optional.patch           | 10 ++++++++++
 kde-plasma/kde-cli-tools/kde-cli-tools-9999.ebuild             |  2 ++
 2 files changed, 12 insertions(+)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/kde.git/commit/?id=c7e30f34dd64a17b0a753ef53dc0a825a9154ac6

commit c7e30f34dd64a17b0a753ef53dc0a825a9154ac6
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2018-02-18 13:31:48 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2018-02-18 13:32:11 +0000

    kde-plasma/plasma-workspace: Fix build w/o tests
    
    Thanks-to: Duncan <1i5t5.duncan@cox.net>
    Bug: https://bugs.gentoo.org/646264
    Package-Manager: Portage-2.3.24, Repoman-2.3.6

 .../files/plasma-workspace-5.12.80-tests-optional.patch    | 14 ++++++++++++++
 kde-plasma/plasma-workspace/plasma-workspace-9999.ebuild   |  3 ++-
 2 files changed, 16 insertions(+), 1 deletion(-)}