Bug 32539 - Check debian/*.{pre,post}{rm,inst} for wrong comment
Check debian/*.{pre,post}{rm,inst} for wrong comment
Product: UCS
Classification: Unclassified
Component: ucslint
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 4.2
Assigned To: Philipp Hahn
Florian Best
: interim-1
Depends on:
  Show dependency treegraph
Reported: 2013-09-10 09:32 CEST by Philipp Hahn
Modified: 2017-04-04 18:30 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:

ucslint check for correct script naming (1.08 KB, text/plain)
2013-09-10 09:33 CEST, Philipp Hahn

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2013-09-10 09:32:41 CEST
The preinst,postinst,prerm,postrm are often copied from previous packages or other files of the same package. In many cases the the comment is not updated, so a "postinst" script talks about itself being a "prerm" script.
The attached simple tests checks if the scripts mentions one of the other script names

# for m in */*; do PYTHONPATH=packaging/ucslint packaging/ucslint/bin/ucslint -m 1700 "$m"; done 2>/dev/null 
W:1700-1: base/univention-doc/debian/univention-doc.prerm: wrong script name: '# postinst script for univention-doc'
W:1700-1: management/univention-legacy-kolab-schema/debian/univention-legacy-kolab-schema.prerm: wrong script name: '#  postinst script for the debian package'
W:1700-1: services/univention-pkgdb/debian/univention-pkgdb.postrm: wrong script name: '#  prerm script for the debian package'
W:1700-1: services/univention-postgresql/debian/univention-postgresql.postrm: wrong script name: '#  postinst'
W:1700-1: services/univention-s4-connector/debian/univention-s4-connector.postrm: wrong script name: '#  postinst script of the samba4 connector package'
W:1700-1: test/ucs-test/debian/ucs-test-framework.postrm: wrong script name: '#  postinst script for the ucs-test-framework package'
Comment 1 Philipp Hahn univentionstaff 2013-09-10 09:33:15 CEST
Created attachment 5419 [details]
ucslint check for correct script naming
Comment 2 Arvid Requate univentionstaff 2013-09-10 10:44:50 CEST
Maybe there is a way to let this boilerplate to be created automatically? It's really non-functional and only of cosmetic importance.
Comment 3 Philipp Hahn univentionstaff 2016-08-30 13:50:22 CEST
r72026 | Bug #32539 ucslint: Warn about wrong script name comments

Package: ucslint
Version: 6.0.0-1A~
Branch: ucs_4.2-0

r72027 | Bug #32539,Bug #41926,Bug #37203: ucslint
Comment 4 Florian Best univentionstaff 2016-12-22 14:08:27 CET
OK: Changelog
OK: fix
Comment 5 Stefan Gohmann univentionstaff 2017-04-04 18:30:08 CEST
UCS 4.2 has been released:

If this error occurs again, please use "Clone This Bug".