I am packaging a piece of Python software that uses DistUtilsExtra. When running python setup.py install
in my debian/rules
, DistUtilsExtra automatically recompiles the translation template .pot
file and updates it directly in the source repository. As a result of that, the second time I execute the packaging commands (be it with debuild
or pdebuild
) an automatic patch file gets created (since it thinks I have manually updated the .pot file). This patch is obviously unwanted in the Debian package and I am searching for a way to not generate it.
One solution would be for DistUtilsExtra to not change the .pot file in the source repository, but for now that's not possible. I am thus testing another solution: create an override for the clean
instruction that extracts the original .pot file from the .orig.tar.gz
tarball, done like this in debian/rules
:
override_dh_clean:
tar -zxvf ../<projname>_*.orig.tar.gz --wildcards --strip-components=1 <projname>-*/po/<projname>.pot
dh_clean
However I've been told on the debian-mentors mailing list that the original tarball is not assured to be located in ../
. I am thus wondering if there is a way to reliably access the .orig.tar.gz
tarball from inside debian/rules
, like a "variable" that would contain its location?