← Back to team overview

maria-developers team mailing list archive

Extra copying in debian/rules causes troubles

 

Hi all.

There is a fragment in MariaDB debian/dist/*/rules files:

...
ifeq ($(findstring nocheck,$(DEB_BUILD_OPTIONS)),)
        # Don't know why the following is necessary...
        cp unittest/unit.pl $(builddir)/unittest/
        cp -r mysql-test/* $(builddir)/mysql-test/
        cp -r sql/share/* $(builddir)/sql/share/
        cp -r scripts/*sql $(builddir)/scripts/
        if [ ! -f testsuite-stamp ] ; then \
...

Recently it started causing a problem. MTR assumes that the tests are run either in a proper source build (be it in-source or out-of-source), or in a binary build. With the extra-copying above, particularly due to copying of mysql-test folder, the builddir by the moment of running tests is in the "neither fish nor fowl" state.

So if one runs dpkg-buildpackage with the tests enabled, it fails when it comes to the MTR stage.

We had this problem reported at least 3 times over the last 24 hours, so it's not hypothetical. It's currently filed as https://mariadb.atlassian.net/browse/MDEV-5591.

I tried to remove these 4 'cp' lines and the build seemed to work all right; but there might also be consequences that I fail to predict, so I would like to have the 2nd (3rd, 4th, ... Nth) opinion. Does anyone have any idea what might go wrong without these 4 lines?

Also, *Kristian*,

These lines are coming from the initial draft of the rules. I understand from the comment that there is no reason to ask *why* the lines were necessary, but I'm wondering if you remember why you felt they *were* necessary (even if didn't know why). Were you getting some errors without them? Or were they copied from some previous version of the file?

I realize it was long time ago so you probably won't remember, but I thought it was worth checking anyway.

Regards,
Elena


Follow ups