Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 739230 - dev-ros/*: Disable pointless lint_cmake test
Summary: dev-ros/*: Disable pointless lint_cmake test
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robot Operating System team
URL:
Whiteboard:
Keywords:
: 734084 734096 736942 736944 736948 738494 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-08-27 09:43 UTC by Alexis Ballier
Modified: 2020-09-30 08:58 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexis Ballier gentoo-dev 2020-08-27 09:43:45 UTC
cmake.eclass appends this to CMakeLists.txt:

                MESSAGE(STATUS "<<< Gentoo configuration >>>
                Build type      \${CMAKE_BUILD_TYPE}
                Install path    \${CMAKE_INSTALL_PREFIX}
                Compiler flags:

Suggestion to use lowercase message: It is not compatible with ancient cmake but shouldn't be a problem for us.
Uppercase macro causes some linter tests to fail for some of my packages. Recent cmake documentation always uses lowercase functions/macros.

Reproducible: Always
Comment 1 Alexis Ballier gentoo-dev 2020-08-27 09:44:44 UTC
*** Bug 738494 has been marked as a duplicate of this bug. ***
Comment 2 Alexis Ballier gentoo-dev 2020-08-27 09:45:02 UTC
*** Bug 736948 has been marked as a duplicate of this bug. ***
Comment 3 Alexis Ballier gentoo-dev 2020-08-27 09:45:18 UTC
*** Bug 736944 has been marked as a duplicate of this bug. ***
Comment 4 Alexis Ballier gentoo-dev 2020-08-27 09:45:34 UTC
*** Bug 736942 has been marked as a duplicate of this bug. ***
Comment 5 Alexis Ballier gentoo-dev 2020-08-27 09:45:56 UTC
see dupes for examples of test failures
Comment 6 Alexis Ballier gentoo-dev 2020-08-27 09:46:46 UTC
*** Bug 734084 has been marked as a duplicate of this bug. ***
Comment 7 Alexis Ballier gentoo-dev 2020-08-27 09:47:14 UTC
*** Bug 734096 has been marked as a duplicate of this bug. ***
Comment 8 Andreas Sturmlechner gentoo-dev 2020-08-27 13:58:24 UTC
What are these ROS packages doing that they fail tests just because of uppercase cmake functions?
Comment 9 Alexis Ballier gentoo-dev 2020-08-27 14:10:45 UTC
(In reply to Andreas Sturmlechner from comment #8)
> What are these ROS packages doing that they fail tests just because of
> uppercase cmake functions?

as written in comment #0 : they use a linter on the cmakelists.txt; theirs is fine, the linter reports an error with what cmake.eclass adds
Comment 10 Andreas Sturmlechner gentoo-dev 2020-08-30 08:19:28 UTC
I've seen that; but why? I mean, they can do that upstream, fine, but doing this has zero benefit on packaging level, right?

While there isn't really anything speaking against changing cmake.eclass to lowercase macro calls, it is not really a fix for the problem in principle. What if their linter comes up with whitespace errors next time around? Or what do we tell maintainer of package X that is now going fail because we add lowercase macro calls in cmake.eclass?
Comment 11 Alexis Ballier gentoo-dev 2020-08-30 20:42:40 UTC
(In reply to Andreas Sturmlechner from comment #10)
> I've seen that; but why? I mean, they can do that upstream, fine, but doing
> this has zero benefit on packaging level, right?
> 
> While there isn't really anything speaking against changing cmake.eclass to
> lowercase macro calls, it is not really a fix for the problem in principle.
> What if their linter comes up with whitespace errors next time around? Or
> what do we tell maintainer of package X that is now going fail because we
> add lowercase macro calls in cmake.eclass?

yes, it does not make that much sense; my thought was more that it fixes my problem and lowercase macros seem to be the norm these days (couldn't find any real reference, only ml posts saying it is better to use lowercase now)

an option in cmake.eclass telling it not to touch cmakelists works for me too btw
Comment 12 Andreas Sturmlechner gentoo-dev 2020-08-30 20:46:20 UTC
Your problem is fixed by disabling the upstream linter or hiding that behind a cmake option.

I will probably change the eclass anyway.
Comment 13 Andreas Sturmlechner gentoo-dev 2020-08-30 21:26:13 UTC
(In reply to Andreas Sturmlechner from comment #12)
> Your problem is fixed by disabling the upstream linter
...and it could look like that:

> src_test() {
> 	# bug 739230
> 	local myctestargs=(
> 		-E "(lint_cmake)"
> 	)
> 
> 	cmake_src_test
> }
Comment 14 Larry the Git Cow gentoo-dev 2020-09-06 16:45:06 UTC
The bug has been referenced in the following commit(s):

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

commit 782ded1ef76176ce39f37e3419daaeb5e2872b88
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2020-08-30 21:15:39 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2020-09-04 12:14:13 +0000

    cmake.eclass: Reformat the cmake code we write to lowercase calls
    
    Add some indendation, drop space between function name and brackets,
    cleanup old style if-else-endif.
    
    Bug: https://bugs.gentoo.org/739230
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 eclass/cmake.eclass | 106 +++++++++++++++++++++++++---------------------------
 1 file changed, 51 insertions(+), 55 deletions(-)
Comment 15 Larry the Git Cow gentoo-dev 2020-09-29 13:55:55 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a26f145f893c3aeffbbbd6ff7dac932c44b6e024

commit a26f145f893c3aeffbbbd6ff7dac932c44b6e024
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2020-08-30 21:15:39 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2020-09-29 13:55:37 +0000

    cmake.eclass: Reformat the cmake code we write to lowercase calls
    
    Add some indendation, drop space between function name and brackets,
    cleanup old style if-else-endif.
    
    Bug: https://bugs.gentoo.org/739230
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 eclass/cmake.eclass | 106 +++++++++++++++++++++++++---------------------------
 1 file changed, 51 insertions(+), 55 deletions(-)
Comment 16 Alexis Ballier gentoo-dev 2020-09-29 14:05:46 UTC
(In reply to Larry the Git Cow from comment #15)
> The bug has been referenced in the following commit(s):
> 
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=a26f145f893c3aeffbbbd6ff7dac932c44b6e024
> 
> commit a26f145f893c3aeffbbbd6ff7dac932c44b6e024
> Author:     Andreas Sturmlechner <asturm@gentoo.org>
> AuthorDate: 2020-08-30 21:15:39 +0000
> Commit:     Andreas Sturmlechner <asturm@gentoo.org>
> CommitDate: 2020-09-29 13:55:37 +0000
> 
>     cmake.eclass: Reformat the cmake code we write to lowercase calls
>     
>     Add some indendation, drop space between function name and brackets,
>     cleanup old style if-else-endif.
>     
>     Bug: https://bugs.gentoo.org/739230
>     Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
> 
>  eclass/cmake.eclass | 106
> +++++++++++++++++++++++++---------------------------
>  1 file changed, 51 insertions(+), 55 deletions(-)

that is good enough for me now
Comment 17 Andreas Sturmlechner gentoo-dev 2020-09-29 21:24:47 UTC
Don't file a bug against cmake.eclass the next time you hit a bug about this then.
Comment 18 Alexis Ballier gentoo-dev 2020-09-30 08:58:58 UTC
(In reply to Andreas Sturmlechner from comment #17)
> Don't file a bug against cmake.eclass the next time you hit a bug about this
> then.

Unless there's something 'weird' done by the eclass or easily fixed, I won't, obviously.
I'm not very keen on maintaining non upstreamable patches, or a list of tests to exclude, because our way of building cmake packages magically modifies upstream sources though.