On Wednesday 16 December 2009 17:40:55 Neil Williams wrote: > No. The package should simply exit cleanly with a successful return > value if perl does not exist, letting everything else proceed as before. > The postinst itself needs to check - that way, Emdebian doesn't have to > patch every package using dh_config_model.
Ok. Here's the new postinst snippet injected by dh_config_model_upgrade: # In case of error (error in configuration file or model bug), the # configuration file is left as is. # testing perl is required to avoid problem in embedded environments if [[ -e /usr/bin/perl ]] then echo "config-edit is upgrading %PACKAGE% configuration with model %MODEL%." config-edit -model %MODEL% -ui none -save %OPTION% || \ echo "WARNING: upgrade with config-edit failed: Run 'config-edit -model %MODEL% -force %OPTION%' and save the configuration." fi Does this fit the bill ? > An alternative is to make dh_config_model* into a no-op if a build > environment variable is set. DEB_BUILD_OPTIONS="noconfigmodel" or > something. With this set, it has to be entirely equivalent to > dh_config_model not appearing in debian/rules at all. Ok. Unless somebeody complains, I will add this at the beginning of dh_config_model_upgrade: if ($ENV{DEB_BUILD_OPTIONS} =~ /noconfigmodel/) { warn "dh_config_model_upgrade: DEB_BUILD_OPTIONS specifies 'noconfigmodel', exiting ...\n"; exit; } > It would be so much better if this whole implementation was in C - as > long as nothing in the config model tried to execute the cross-built > executable on the build system. Then the ability to disable it via a > build option would be truly orthogonal to the actual issue of whether > perl exists. Well, a C implementation of the core part of Config::Model is possible, but it would take a while to create. I don't have the bandwidth for this. All the best Dominique -- http://config-model.wiki.sourceforge.net/ -o- http://search.cpan.org/~ddumont/ http://www.ohloh.net/accounts/ddumont -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org