[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: InVesalius new upstream version



On 14/08/17 15:17, Mattia Rizzolo wrote:
2. I created a debian/source/options file with extend-diff-ignore
option. During the package generation I'm moving the cython source
files to another folder to compile them. This is causing errors with
generation of diff file relative to the orig file.
So I'm using the extend-diff-ignore to ignore these files. Am I doing
it correctly?

That feels like something that is not as clean as it could be.  Also,
reading your description of what you are doing I believe your package
wouldn't build twice in a row (i.e. `dpkg-buildpackage &&
dpkg-buildpackage`), which is another bug.  I think what you want to do
instead is to *copy* those sources into a temporary directory that you
then remove with dh_clean.  That said, this feels like an upstream
thing, why do you need to copy/move files around before building them?
The clean target doesn't clean enough? etc etc.

Since Cythonized files can be regenerated, you can just filter them out of the source tarball and run the build as usual. Their absence will not trigger a diff error and the clean target should get rid of the generated ones. That's in theory.

In practice, some upstream do ship the Cythonized files to avoid a dependency on Cython at build time (fair enough) but do not provide an appropriate clean command to get rid of them (not nice).

If that's your case, in addition to excluding the Cythonized files from the tarball, you need to clean them manually either using an override for the dh_auto_clean target or by listing their corresponding paths in a debian/clean file (usually preferred).

You may also patch the build system and forward the clean command upstream too (even better).

Ghis


Reply to: