Prevent the creation of empty omf/* folder
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-distutils-extra |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I've set up a project called Nautilus Image Manipulator [1], using Quickly [2]. By default the setup.py script uses DistUtilsExtra.auto to install the program.
When running debuild to generate a Debian package, lintian (quality control for Debian packages) complains about the creation of an empty directory "usr/share/
$ lintian -i -I --show-overrides nautilus-
I: nautilus-
N:
N: This package installs an empty directory. This might be intentional but
N: it's normally a mistake. If it is intentional, add a lintian override.
N:
N: If a package ships with or installs empty directories, you can remove
N: them in debian/rules by calling:
N:
N: $ find path/to/base/dir -type d -empty -delete
N:
N: Severity: wishlist, Certainty: possible
N:
Looking at the output of debuild, I noticed that the usr/share/
Looking on the Internet, I found this discussion [3] possibly linking DistUtilsExtra with this empty folder creation. I went digging through the code of DistUtilsExtra and think that I have located the origin of this problem in build_help.
data_files is initialized empty ( = []), then there is a for loop that would add files (but in my case no eligible files are encountered, so "data_files" stays empty), and at the end the following line appends to the "empty" structure:
data_files.
I believe this should be preceded by a "if" condition, so that this only gets appended if data_files is not empty.
Is my analysis wrong? Is there a good reason to be creating this empty directory if there is no "omf" file (whatever these files are supposed to be...)?
Thanks for looking into that.
[1] https:/
[2] https:/
[3] https:/
Has this also been fixed by r241 [0] committed by Martin Pitt? The part about adding omf files is now conditional. I believe this bug can be closed.
[0] http:// bazaar. launchpad. net/~python- distutils- extra-hackers/ python- distutils- extra/debian/ revision/ 241