Bug#1098969: DebFile scripts ignore DEBIAN/templates file

Gabriel B. Sant'Anna gabriel.santanna at canonical.com
Wed Feb 26 20:02:08 GMT 2025


Package: python3-debian
Version: 0.1.52

The `scripts` method in `debfile.DebFile` doesn't list templates
files, which might be required by config scripts.

Reproduction:

>>> from debian import debfile
>>> deb = debfile.DebFile('xserver-xorg-legacy_21.1.12-1ubuntu1_amd64.deb')
>>> print(deb.scripts().keys())
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



More information about the pkg-python-debian-maint mailing list