Richard Kettlewell <r...@greenend.org.uk> writes: > This output comes from running Lintian against some of my local > packaces, which aren't part of Debian but produce .deb files for > convenience. > > I have this bit of code in a postinst: > > if type update-menus >/dev/null 2>&1; then > update-menus > fi > > This produces two diagnostics from Lintian. > > E: disobedience: > maintainer-script-does-not-check-for-existence-of-updatemenus postinst:25
> Of course, I am checking for it, just not assuming anything about its > location. Because of the second issue below, Lintian doesn't recognize type as a way of checking for the existence of a command. It might be worth adding it so that we don't warn twice of the same basic thing, once confusingly. > W: disobedience: possible-bashism-in-maintainer-script postinst:24 'if > type ' > In fact 'type' is listed in the SUS, so I think this warning is just > plain wrong. > > http://www.opengroup.org/onlinepubs/009695399/utilities/type.html It's an XSI extension (that's what the notation in the synopsis section means), which means you're not allowed to use it in /bin/sh scripts in Debian per current Policy. Only the base POSIX features are allowed at present (plus the exceptions listed in Policy). Given that dash implements type, an argument could be made that Policy should permit it. On the other hand, given that equivalent functionality is provided several other ways in Debian, I'm not sure there's any point in adding it rather than having people just switch to which or command -v. > Also a wishlist item: > > W: disorder source: out-of-date-standards-version 3.7.2.2 (current is 3.8.0) > What would be really handy here is a pointer to policy change history. Like a mention of /usr/share/doc/debian-policy/upgrading-checklist.txt.gz? -- Russ Allbery (r...@debian.org) <http://www.eyrie.org/~eagle/> -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org