[Pkg-jed-commit] r43 - in trunk/packages/jed/debian: . patches
Jörg Sommer
jo-guest@costa.debian.org
Mon, 30 May 2005 18:57:54 +0000
Author: jo-guest
Date: 2005-05-30 18:57:53 +0000 (Mon, 30 May 2005)
New Revision: 43
Added:
trunk/packages/jed/debian/jed-common.config
trunk/packages/jed/debian/jed-common.preinst
trunk/packages/jed/debian/jed-common.templates
Removed:
trunk/packages/jed/debian/patches/50_emacs-bindings.dpatch
Modified:
trunk/packages/jed/debian/changelog
trunk/packages/jed/debian/compile
trunk/packages/jed/debian/jed-common.postinst
trunk/packages/jed/debian/patches/00list
trunk/packages/jed/debian/rules
Log:
* removed 50_emacs-bindings.dpatch, because it is redundant to jeds
default settings
* jed-common now uses debconf for asking if 00site.sl and 99defaults.sl
should be removed and ask if sl files should get precompiled
* jed-common.config added as file to (pre)configure the jed-common
package. Currently there are two targets:
+ rm-site-defaults is asked if /etc/jed-init.d/00site.sl and/or
99defaults.sl exist and are modified (checked with md5 sums)
+ compile-sl is for asking if sl files should get precompiled
* jed-common.templates: added templates for rm-site-defaults and compile-sl
* debian/compile
+now asks debconf if it should precompile sl files
+ uses null terminated strings for find and xargs (this is robust
against filenames with whitspaces)
* debian/rules installs debconf files
* jed-common.postinst
+ added support for debconf
+ only compile sl files if requested
* jed-common.preint created to remove 00site.sl and/or 99defaults.sl if
requested
Modified: trunk/packages/jed/debian/changelog
===================================================================
--- trunk/packages/jed/debian/changelog 2005-05-12 18:22:57 UTC (rev 42)
+++ trunk/packages/jed/debian/changelog 2005-05-30 18:57:53 UTC (rev 43)
@@ -41,6 +41,13 @@
* moved /u/s/j/lib/jed.rc to examples and disabled searching for in
00debian.sl by setting Default_Jedrc_Startup_File = NULL
(Closes: 219448)
+ * removed 50_emacs-bindings.dpatch, because jed.rc is out of the way
+ and emacs emulation is the default of jed
+ * from now the user is asked if the sl files in jed-common should get
+ precompiled after installation
+ * if 00site.sl and 99defaults.sl exist and were changed the user is
+ asked if they should get removed; otherwise they are droped silently
+ (Closes: 266981)
--
Modified: trunk/packages/jed/debian/compile
===================================================================
--- trunk/packages/jed/debian/compile 2005-05-12 18:22:57 UTC (rev 42)
+++ trunk/packages/jed/debian/compile 2005-05-30 18:57:53 UTC (rev 43)
@@ -3,12 +3,19 @@
LIBDIR=/usr/share/jed/lib/
PREPARSE=preparse.sl
+. /usr/share/debconf/confmodule
+
+db_get jed-common/compile-sl
+if [ "$RET" != true ]; then
+ exit 0
+fi
+
case "$1" in
install)
jed-script $PREPARSE
;;
remove)
- find $LIBDIR -name \*.slc -o -name \*.dfa | xargs rm -f
+ find $LIBDIR -name \*.slc -o -name \*.dfa -print0 | xargs -0 rm -f
;;
*)
echo "unknown argument --> \"$1"\" >&2
Added: trunk/packages/jed/debian/jed-common.config
===================================================================
--- trunk/packages/jed/debian/jed-common.config 2005-05-12 18:22:57 UTC (rev 42)
+++ trunk/packages/jed/debian/jed-common.config 2005-05-30 18:57:53 UTC (rev 43)
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+if [ -e /etc/jed-init.d/00site.sl ] ||
+ [ -e /etc/jed-init.d/99defaults.sl ]; then
+
+ # the md5sums posted by Rafael on pkg-jed-devel@l.a.d.o
+ if ( [ -e /etc/jed-init.d/00site.sl ] &&
+ echo '2e00fef46fcee03fe504cea3b58510b6 /etc/jed-init.d/00site.sl' |
+ md5sum -c 2>/dev/null ) ||
+ ( [ -e /etc/jed-init.d/99defaults.sl ] &&
+ echo '1514586554dfe5aefcee84aa967fb01b /etc/jed-init.d/99default.sl' |
+ md5sum -c 2>/dev/null )
+ then
+ db_input medium jed-common/rm-site-defaults || true
+ else
+ # they aren't modified
+ db_set jed-common/rm-site-defaults true
+ fi
+fi
+
+db_input medium jed-common/compile-sl || true
+db_go || true
Modified: trunk/packages/jed/debian/jed-common.postinst
===================================================================
--- trunk/packages/jed/debian/jed-common.postinst 2005-05-12 18:22:57 UTC (rev 42)
+++ trunk/packages/jed/debian/jed-common.postinst 2005-05-30 18:57:53 UTC (rev 43)
@@ -1,22 +1,27 @@
#!/bin/sh -e
+. /usr/share/debconf/confmodule
+
case "$1" in
configure)
install-info --quiet --section Editors Editors --description='Programmers editor.' /usr/share/info/jed.info.gz;
TEMP=$(tempfile)
- RET=0
- printf "Running /usr/share/jed/compile/jed-common..."
- /usr/share/jed/compile/jed-common install >$TEMP 2>&1 || RET=$?
- if test "$RET" -ne 0 ; then
- echo "failed (see $TEMP)"
- exit $RET
+ db_get jed-common/compile-sl
+ if [ "$RET" = true ]; then
+ printf "Running /usr/share/jed/compile/jed-common..."
+ RET=0
+ /usr/share/jed/compile/jed-common install >$TEMP 2>&1 || RET=$?
+ if test "$RET" -ne 0 ; then
+ echo "failed (see $TEMP)"
+ exit $RET
+ fi
+ echo "done"
+
+ rm $TEMP
fi
- echo "done"
-
- rm $TEMP
;;
abort-upgrade|abort-remove|abort-deconfigure)
Added: trunk/packages/jed/debian/jed-common.preinst
===================================================================
--- trunk/packages/jed/debian/jed-common.preinst 2005-05-12 18:22:57 UTC (rev 42)
+++ trunk/packages/jed/debian/jed-common.preinst 2005-05-30 18:57:53 UTC (rev 43)
@@ -0,0 +1,45 @@
+#! /bin/sh
+
+set -e
+
+case "$1" in
+ install|upgrade)
+ . /usr/share/debconf/confmodule
+
+ if [ -e /etc/jed-init.d/00site.sl ] ||
+ [ -e /etc/jed-init.d/99defaults.sl ]; then
+
+ # the md5sums posted by Rafael on pkg-jed-devel@l.a.d.o
+ if ( [ -e /etc/jed-init.d/00site.sl ] &&
+ echo '2e00fef46fcee03fe504cea3b58510b6 /etc/jed-init.d/00site.sl' |
+ md5sum -c 2>/dev/null ) ||
+ ( [ -e /etc/jed-init.d/99defaults.sl ] &&
+ echo '1514586554dfe5aefcee84aa967fb01b /etc/jed-init.d/99default.sl' |
+ md5sum -c 2>/dev/null )
+ then
+ db_input medium jed-common/rm-site-defaults || true
+ db_go || true
+ else
+ # they aren't modified
+ db_set jed-common/rm-site-defaults true
+ fi
+ fi
+
+ db_get jed-common/rm-site-defaults
+ if [ "$RET" = true ]; then
+ rm -f /etc/jed-init.d/00site.sl /etc/jed-init.d/defaults.sl
+ fi
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
Added: trunk/packages/jed/debian/jed-common.templates
===================================================================
--- trunk/packages/jed/debian/jed-common.templates 2005-05-12 18:22:57 UTC (rev 42)
+++ trunk/packages/jed/debian/jed-common.templates 2005-05-30 18:57:53 UTC (rev 43)
@@ -0,0 +1,22 @@
+Template: jed-common/rm-site-defaults
+Type: boolean
+Default: false
+Description: Remove 00site.sl and 99defaults.sl
+ Due to a bug in dpkg (#108587) the config files 00site.sl and
+ 99defaults.sl in /etc/jed-init.d/ aren't removed after an upgrade to
+ 0.99.15-1 or higher.
+ .
+ It seems you have modified one of this files, because their md5 sums
+ differ from the originals.
+ .
+ Should /etc/jed-init.d/00site.sl and /etc/jed-init.d/99defaults.sl get
+ removed?
+
+Template: jed-common/compile-sl
+Type: boolean
+Default: true
+Description: Precomile SLang files
+ jed-common do not ship precompiled sl files anymore. You have now the
+ option to precompile them after installation.
+ .
+ Do you want to precompile .sl files?
Modified: trunk/packages/jed/debian/patches/00list
===================================================================
--- trunk/packages/jed/debian/patches/00list 2005-05-12 18:22:57 UTC (rev 42)
+++ trunk/packages/jed/debian/patches/00list 2005-05-30 18:57:53 UTC (rev 43)
@@ -2,7 +2,6 @@
50_slangfun-txt.dpatch
50_jed-manpage
50_enable-xrenderfont
-50_emacs-bindings
50_paste-mode-sl
50_pymode_indent
60_gpm-mouse-support
Deleted: trunk/packages/jed/debian/patches/50_emacs-bindings.dpatch
===================================================================
--- trunk/packages/jed/debian/patches/50_emacs-bindings.dpatch 2005-05-12 18:22:57 UTC (rev 42)
+++ trunk/packages/jed/debian/patches/50_emacs-bindings.dpatch 2005-05-30 18:57:53 UTC (rev 43)
@@ -1,18 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 50_emacs-bindings.dpatch by Rafael Laboissiere <rafael@debian.org>
-##
-## DP: Start jed in Emacs emulation mode
-
-@DPATCH@
-
---- jed-0.99.16.pre.0.99.17.84.orig/lib/jed.rc
-+++ jed-0.99.16.pre.0.99.17.84/lib/jed.rc
-@@ -28,7 +28,7 @@
- % uncomment Wordstar line. A similar statement applies for BRIEF,
- % and for Borland IDE-like bindings.
- %
--% () = evalfile("emacs"); % Emacs-like bindings
-+ () = evalfile("emacs"); % Emacs-like bindings
- % () = evalfile("edt"); % EDT emulation
- % () = evalfile ("ide"); % Borland IDE (see also doc/ide-mode.txt)
- % () = evalfile ("brief"); % Brief Keybindings (MSDOS only!!)
Modified: trunk/packages/jed/debian/rules
===================================================================
--- trunk/packages/jed/debian/rules 2005-05-12 18:22:57 UTC (rev 42)
+++ trunk/packages/jed/debian/rules 2005-05-30 18:57:53 UTC (rev 43)
@@ -105,6 +105,8 @@
dh_install -pjed-common debian/init.d/*.sl etc/jed-init.d/
dh_install -pjed-common debian/init.d/jed.conf etc/
+ dh_installdebconf -i
+
@echo
@echo --- INSTALL-ARCH-INDEP ---
@echo