Delete Percona-Server/CMakeCache.txt from the build-binary.sh script

Bug #1164699 reported by Roel Van de Paar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.1
Invalid
Low
Unassigned
5.5
Triaged
Medium
Unassigned
5.6
Triaged
Medium
Unassigned
5.7
Triaged
Medium
Unassigned

Bug Description

When building various builds (./build/build-binary.sh . ; ./build/build-binary.sh --debug . ; ./build/build-binary.sh --debug --valgrind .) it's easy to forget to include deletions of Percona-Server/CMakeCache.txt

This feature request to see if we can/should add 'rm Percona-Server/CMakeCache.txt' into the build-binary.sh script so that it's a cleaner build automatically, each time.

(hijack; at the same time, can we also make it so that if no options are passed, "." is assumed as default $1?)

Tags: pkg qa
Revision history for this message
Stewart Smith (stewart) wrote : Re: [Bug 1164699] [NEW] Delete Percona-Server/CMakeCache.txt from the build-binary.sh script

RoelV <email address hidden> writes:
> Public bug reported:
>
> When building various builds (./build/build-binary.sh . ; ./build/build-
> binary.sh --debug . ; ./build/build-binary.sh --debug --valgrind .)
> it's easy to forget to include deletions of Percona-
> Server/CMakeCache.txt
>
> This feature request to see if we can/should add 'rm Percona-
> Server/CMakeCache.txt' into the build-binary.sh script so that it's a
> cleaner build automatically, each time.

This is probably a really good idea, CMake is fairly awful at doing such
things, and as a workaround we have the bzr clean-tree option enabled in
most Jenkins builds.

--
Stewart Smith

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

How about making these scripts work on empty directories only?

Revision history for this message
Roel Van de Paar (roel11) wrote :

If the CMakeCache.txt deletion is considered enough to ensure clean builds, that would be an easy fix & good enough for QA. Is it enough though?

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Enforcing out-of-source builds on empty directories only would nip any stale build artifact issue in the bud, but maybe removing CMakeCache.txt is good enough, so I am not sure.

Revision history for this message
Ignacio Nin (ignacio-nin) wrote :

Hi,

The binary scripts, unlike their rpm/dpkg counterparts, configure and make in the source directory. This is inconvenient for many reasons, including the one that inspired this bug.

I was working on a solution to have it configure to another directory (perhaps export the source like the other scripts) so the source directory remains unchanged. This should cover this issue and some others.

I'll link that branch to this bug, let me know if this is an acceptable solution.

About the target directory, already the default directory is .

Revision history for this message
Stewart Smith (stewart) wrote : Re: [Bug 1164699] Re: Delete Percona-Server/CMakeCache.txt from the build-binary.sh script

Laurynas Biveinis <email address hidden> writes:
> Enforcing out-of-source builds on empty directories only would nip any
> stale build artifact issue in the bud, but maybe removing CMakeCache.txt
> is good enough, so I am not sure.

out of source builds is a good idea anyway, it appears to be the most
supported way going forward for MySQL.

I'd prefer it if we even did out of source builds after generating
source tarball.

--
Stewart Smith

tags: added: pkg
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1352

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.