#1120290 dh-elpa: should verify that all .el files are shipped with options to exclude

#1120290#5
Date:
2025-11-07 01:34:22 UTC
From:
To:
As title says.  We have encountered a few bug reports (e.g. Bug#1106748,
Bug#1120049) due to some files not being shipped as intended.  This
usually happens when some packages explicitly list the .el files in
debian/elpa or debian/<package>.elpa instead of using a glob.  This is
usually done with good reasons, such as to exclude test files, or need
to distribute .el files in different packages.

It would be good that dh-elpa can also check that all intended files are
included in the `elpa' file of all binary packages.  Ideally it should
handle glob, skip hidden files like `.dir-locals.el' and test files by
default, and provide an option (e.g. `--exclude-el') to optionally skip
more files as needed.

(I sense this would be hard to verify without implementing unit tests
first :/)

#1120290#10
Date:
2025-11-07 10:34:44 UTC
From:
To:
Xiyue Deng <manphiz@gmail.com> writes:

I didn't investigate much, but this seems like the job dh_missing is
supposed to do. Why doesn't it work for dh_elpa using packages? The
--fail-missing option is default now (compat 13).

#1120290#15
Date:
2025-11-09 05:24:51 UTC
From:
To:
Hi David,

David Bremner <david@tethera.net> writes:

Thanks for the pointer!  I took a look and it looks like that in dh_elpa
only source files listed in the debian/*elpa files are actually logged
in log_installed_file (see [1][2][3]), so this won't check the actual
files in the source directory.  In that sense, I guess dh_missing is
probably used for verifying that all files listed in
debian/*{install,elpa} are included in the .deb package.  And I feel
like this is probably intended, as it makes sense if files are shipped
in multiple packages, but I could be missing something.

This leaves the question on whether we want to implement this logic
separately in dh-elpa, or fix the usage of log_installed_files?  For the
latter, I also wonder whether dh_missing should be used this way, or IOW
whether it is already working as intended.

[1] https://salsa.debian.org/emacsen-team/dh-elpa/-/blob/master/dh_elpa?ref_type=heads#L234
[2] https://salsa.debian.org/emacsen-team/dh-elpa/-/blob/master/dh_elpa?ref_type=heads#L274
[3] https://salsa.debian.org/emacsen-team/dh-elpa/-/blob/master/dh_elpa?ref_type=heads#L287