[Pkg-ayatana-devel] Bug#892091: Bug#892091: ayatana-indicator-power: FTBFS randomly - gschemas.compiled generated twice

James Cowgill jcowgill at debian.org
Mon Mar 12 14:08:11 UTC 2018


Hi,

On 12/03/18 13:47, Mike Gabriel wrote:
> On  Mo 12 Mär 2018 14:29:18 CET, James Cowgill wrote:
>> On 11/03/18 15:40, Mike Gabriel wrote:
>>> On  Mo 05 Mär 2018 12:31:34 CET, James Cowgill wrote:
>>>> From cmake-commands(7) - add_custom_command:
>>>> "Do not list the output in more than one independent target that may
>>>> build in parallel or the two instances of the rule may conflict
>>>> (instead
>>>> use the add_custom_target() command to drive the command and make the
>>>> other targets depend on that one)."
>>>>
>>>> There are three independent targets here which use gschemas.compiled
>>>> (the three tests).
>>>>
>>>> I found this blog which tries to explain it (number 4):
>>>> https://samthursfield.wordpress.com/2015/11/21/cmake-dependencies-between-targets-and-files-and-custom-commands/
>>>>
>>>>
>>>>
>>>> James
>>>
>>> Thanks for your research on this.
>>>
>>> Would this feel like a valid fix?
>>>
>>> ```
>>> diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
>>> index 2c45057..714fa6c 100644
>>> --- a/tests/CMakeLists.txt
>>> +++ b/tests/CMakeLists.txt
>>> @@ -32,6 +32,14 @@ add_custom_command (OUTPUT gschemas.compiled
>>>                      COMMAND cp -f ${CMAKE_BINARY_DIR}/data/*gschema.xml
>>> ${SCHEMA_DIR}
>>>                      COMMAND ${COMPILE_SCHEMA_EXECUTABLE} ${SCHEMA_DIR})
>>>
>>> +add_custom_target(
>>> +    test-notify-gschemas ALL DEPENDS gschemas.compiled
>>> +)
>>> +
>>> +add_custom_target(
>>> +    test-device-gschemas ALL DEPENDS gschemas.compiled
>>> +)
>>
>> I don't think this will work because these two targets might be built in
>> parallel and we end up with the same problem as before. I think you want
>> a single custom target which all the tests depend on.
>>
>> James
> 
> Hmm, but what you say above would contradict the howto provided under
> (4.) at this URL [1] (the one you quoted earlier).
> 
> I think, I exactly immitated what Sam Thursfield wrote on his blog.
> Don't you think?

I think the code directly under the section 4 heading is a failing test
case and an example of what you should _not_ do.

James

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-ayatana-devel/attachments/20180312/a58db3f6/attachment-0001.sig>


More information about the Pkg-ayatana-devel mailing list