On Thu, Sep 08, 2011 at 04:18:50PM +0200, Josip Rodin wrote: > Ahem, so I must quote it: > > #!/bin/sh -e > case "$1" in > build) > clean) > binary-arch|binary) > binary-indep) > > Is the compliance with policy easier to read from the obfuscated makefile > example at the top, or from the trivial shell example above? It's awful, for several reasons: - It's a confusing mix of building and packaging. You could quite easily have a separate Makefile to do the actual compilation and cleaning of the compilation, and then call that with $(MAKE) in your build and clean rules, and leave debian/rules solely dedicated to packaging (which is its intended purpose). - If you had it all in a proper makefile, even the building, you could use standard make targets to do the building rather than having it all in a long script. It's less confusing and more maintainable. And most importantly, it's what is expected should anyone else need to work on the package. - It imposes a maintenance burden not just on you, but on the distribution /as a whole/ should it be necessary for anyone else to work on this, e.g. during a transition. And given the inflexibility, it's most likely that this package will require attention during transitions. - It lacks build-arch/build-indep/build targets. This was already flagged up during the whole-archive rebuild (this is the /only/ package failing all the checks, BTW), but because it's not a makefile, I guess lintian will not be picking up this error (and additionally the other lintian checks for debian/rules are likely also failing). So this is a case in point for the transition issue above. Are you planning to support these targets for wheezy? - If you were using debhelper/dh/cdbs, you would not need to update this script to keep the package policy compliant. Again, it's making your life easier and your package more robust and of higher quality in the face of changes in other packages during development. If something external changes, the packages can just be scheduled for a binNMU rather than requiring manual work and then a maintainer upload. - If you really needed to use shell, then you can just put the shell in the appropriate make rule. I entirely fail to see *any* benefit in using a shell script here over doing things the standard way. Particularly when there are *far* better alternatives such as dh, or even plain debhelper which make the archive, as a whole, much easier to maintain. It would take ten minutes to convert this to a proper makefile, and another ten to convert to debhelper and/or dh, which IMO would be well worth it in the long run. Regards, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linux http://people.debian.org/~rleigh/ `. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/ `- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
Attachment:
signature.asc
Description: Digital signature