- Package:
- python3-debian
- Source:
- python3-debian
- Submitter:
- Gabriel B. Sant'Anna
- Date:
- 2026-02-25 19:29:02 UTC
- Severity:
- normal
- Tags:
The `scripts` method in `debfile.DebFile` doesn't list templates files, which might be required by config scripts. Reproduction: dict_keys(['postinst', 'postrm', 'config']) The particular package is not important; this one just happens to include a DEBIAN/templates file which is not being listed by the scripts() method above. Fixing this requires only appending 'templates' to the MAINT_SCRIPTS array in src/debian/debfile.py, a change which doesn't cause any regressions in the test suite. Best regards, Gabriel B. Sant'Anna
Control: tags -1 moreinfo
I believe the current behaviour is correct. Since `DEBIAN/templates` is
not a `maintscript`, it should not be included in `scripts()`. It is the
same reason why `DEBIAN/control` is also not present in that value.
If you want to see if the file is present,
`deb.control.has_file('templates')` would be the way to go about it.
Beyond that, `deb.control` also has accessors for the actual contents.
Best regards,
Niels
Resent, this time with the submitter included, so they also get the mail. Niels Thykier:
Resent, this time with the submitter included, so they also get the mail. Niels Thykier:
That's fair, although it could be argued that the templates file could also be included since, when present, it's often needed by the main scripts. From the Debian Policy ( https://www.debian.org/doc/debian-policy/ch-binary.html#s-maintscriptprompt ): contain the additional package metadata files `config` and `templates`. configuration, and `templates` contains templates used for user prompting. Still, I think it's fine to keep this as it is, but it would be nice to have this limitation documented in the API.