r48888 - in /trunk/libconfig-model-perl/debian: README.debian changelog dh/config-config-model dh/dh_config_model_upgrade dh/postinst-config-model libconfig-model-perl.install libconfig-model-perl.templates po/
ddumont-guest at users.alioth.debian.org
ddumont-guest at users.alioth.debian.org
Wed Dec 16 17:13:20 UTC 2009
Author: ddumont-guest
Date: Wed Dec 16 17:13:14 2009
New Revision: 48888
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=48888
Log:
removed debconf question after discussion on debian-devel
Removed:
trunk/libconfig-model-perl/debian/dh/config-config-model
trunk/libconfig-model-perl/debian/libconfig-model-perl.templates
trunk/libconfig-model-perl/debian/po/
Modified:
trunk/libconfig-model-perl/debian/README.debian
trunk/libconfig-model-perl/debian/changelog
trunk/libconfig-model-perl/debian/dh/dh_config_model_upgrade
trunk/libconfig-model-perl/debian/dh/postinst-config-model
trunk/libconfig-model-perl/debian/libconfig-model-perl.install
Modified: trunk/libconfig-model-perl/debian/README.debian
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-model-perl/debian/README.debian?rev=48888&op=diff
==============================================================================
--- trunk/libconfig-model-perl/debian/README.debian (original)
+++ trunk/libconfig-model-perl/debian/README.debian Wed Dec 16 17:13:14 2009
@@ -2,21 +2,30 @@
debian developer to add better configuration upgrade to the packages
they maintain.
-Let's assume that Joe, debian developer, wants to add smooth upgrade
-capability to his foobar package.
+Let's assume that Joe, debian developer, had seen too many questions
+from users regarding configuration upgrades during package
+upgrades. Users complains that their settings are lost or that ucf's
+questions are too cryptic. So Joe has had enoudh and wants to add
+smooth upgrade capability to his foobar package.
What will the end user see ?
+----------------------------
-The end user may have to answer a medium debconf question asking him
-whether to upgrade foobar package with Config::Model. Hopefully,
-that's all the end user will see.
+Hopefully, just a message during upgrade indicating that Config::Model
+is taking care of the upgrade.
What does Joe, debian developer, has to do ?
+--------------------------------------------
- ensure that a proper configuration model for the application
- contained in foobar exists.
-- ensure that foobar.postinst and foobar.config have a #DEBHELPER#
- line (if these files exist)
+ contained in foobar exists. Either:
+ - find the package containing the relevant model in Debian
+ (something like libconfig-model-foobar-perl)
+ - find the package in CPAN and ask debian-perl team to package it
+ - write the model. In this case, you may want to subscribe to
+ config-model users list (see below)
+- ensure that foobar.postinst has a #DEBHELPER# line (if this file
+ exists)
- ensure that foobar.control has a dependency on ${misc:Depends}
- ensure that call dh_config_model_upgrade during package build.
Either:
@@ -24,28 +33,23 @@
- directly call dh_config_model_upgrade. See
dh_config_model_upgrade man page for more details
+Note to developer for embedded system: you can remove all dependencies
+on Config::Model and Perl by removing dh_config_model_upgrade call
+from rules
+
(Simple instructions for CDBS should be provided. Help is welcome there)
How does this work ?
+--------------------
-When called, dh_config_model_upgrade will setup foobar package to ask
-whether to upgrade the configuration with Config::Model or not.
+When called, dh_config_model_upgrade will setup foobar package to
+upgrade the configuration with Config::Model.
This requires to:
- add a dependency on libconfig-model-perl in foobar control file
-- add or update foobar.config file so that the question is raised by
- debconf. This file is generated from config-config-model delivered
- by libconfig-model-perl package
- add or update foobar.postinst file so that the configuration is
- upgraded if the user answered yes to the question above This file is
- generated from postinst-config-model delivered by libconfig-model-perl
- package
-- last but not least, both foobar.config and foobar.postinst will use
- a template delivered by libconfig-model-perl
- (libconfig-model-perl.templates) to ask the question to user. This
- template contains a ${pkg_name} substitution that will be replaced
- with 'foobar' by foobar.config and foobar.postinst (See SUBST
- debconf command in debconf-devel(7))
+ upgraded. In case of upgrade issue, a message is displayed inviting the
+ user to re-run the upgrade command in force and interactive mode.
All these operations are handled by dh_config_model_upgrade.
@@ -54,5 +58,5 @@
Config::Model home page is http://config-model.wiki.sourceforge.net/
User mailing list: http://sourceforge.net/mail/?group_id=155650
-Feel free to contact the package maintainer (domi dor dumont at free dot fr)
+Feel free to contact the package maintainer (domi dot dumont at free dot fr)
if more explanations are needed.
Modified: trunk/libconfig-model-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-model-perl/debian/changelog?rev=48888&op=diff
==============================================================================
--- trunk/libconfig-model-perl/debian/changelog (original)
+++ trunk/libconfig-model-perl/debian/changelog Wed Dec 16 17:13:14 2009
@@ -1,3 +1,11 @@
+libconfig-model-perl (0.640-4) UNRELEASED; urgency=low
+
+ * Removed debconf question as it was not a good idea (as discussed
+ on debian-devel).
+ * README.debian: clarified developer's jobs
+
+ -- Dominique Dumont <dominique.dumont at hp.com> Wed, 16 Dec 2009 15:52:39 +0100
+
libconfig-model-perl (0.640-3) unstable; urgency=low
[ Dominique Dumont ]
Modified: trunk/libconfig-model-perl/debian/dh/dh_config_model_upgrade
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-model-perl/debian/dh/dh_config_model_upgrade?rev=48888&op=diff
==============================================================================
--- trunk/libconfig-model-perl/debian/dh/dh_config_model_upgrade (original)
+++ trunk/libconfig-model-perl/debian/dh/dh_config_model_upgrade Wed Dec 16 17:13:14 2009
@@ -91,8 +91,6 @@
autoscript($package,postinst => 'postinst-config-model',
$model_sed.$pack_sed.$opt_sed ) ;
- # ask debconf question in pre-inst
- autoscript($package, config => 'config-config-model',$pack_sed);
}
__END__
Modified: trunk/libconfig-model-perl/debian/dh/postinst-config-model
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-model-perl/debian/dh/postinst-config-model?rev=48888&op=diff
==============================================================================
--- trunk/libconfig-model-perl/debian/dh/postinst-config-model (original)
+++ trunk/libconfig-model-perl/debian/dh/postinst-config-model Wed Dec 16 17:13:14 2009
@@ -1,27 +1,6 @@
-# Do we need a general debconf question to decide about general
-# policy in case of error (force || UI || skip) ?
+# In case of error (error in configuration file or model bug), the
+# configuration file is left as is.
-# In case of error:
-# - fall back on other method (rather moot if new policy is provided
-# only through a model)
-# - use -force option ?
-# - fire UI ?
-# - don't upgrade
-
-# load confmodule only if required
-if [ `typeset -F db_get` != "db_get" ] ; then
- . /usr/share/debconf/confmodule
-fi
-
-db_x_loadtemplatefile /var/lib/dpkg/info/libconfig-model-perl.templates
-
-db_subst libconfig-model-perl/automatic-upgrade pkg_name %PACKAGE%
-
-# debconf question to check if user want automatic upgrade
-db_get libconfig-model-perl/automatic-upgrade || true
-
-if [ "$RET" = true ]
-then
- echo "config-model-edit is upgrading %PACKAGE% configuration with model %MODEL%."
- config-edit -model %MODEL% -ui none -save %OPTION%
-fi
+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."
Modified: trunk/libconfig-model-perl/debian/libconfig-model-perl.install
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-model-perl/debian/libconfig-model-perl.install?rev=48888&op=diff
==============================================================================
--- trunk/libconfig-model-perl/debian/libconfig-model-perl.install (original)
+++ trunk/libconfig-model-perl/debian/libconfig-model-perl.install Wed Dec 16 17:13:14 2009
@@ -1,3 +1,2 @@
-debian/dh/config-config-model usr/share/debhelper/autoscripts/
debian/dh/config_model.pm usr/share/perl5/Debian/Debhelper/Sequence/
debian/dh/postinst-config-model usr/share/debhelper/autoscripts/
More information about the Pkg-perl-cvs-commits
mailing list