[Pkg-jed-commit] r55 - in trunk/packages: jed/debian jed-extra/debian
Jörg Sommer
jo-guest@costa.debian.org
Sun, 03 Jul 2005 12:12:45 +0000
Author: jo-guest
Date: 2005-07-03 12:12:44 +0000 (Sun, 03 Jul 2005)
New Revision: 55
Modified:
trunk/packages/jed-extra/debian/compile
trunk/packages/jed/debian/compile
trunk/packages/jed/debian/jed-common.postinst
trunk/packages/jed/debian/jed.prerm
Log:
* jed and jed-extra compile
+ make compile not fail if jed-script is missing. This is the case if
jed-common is installed before jed, which is not a problem, because
jed runs all files in /u/s/j/compile/ after installation again.
+ removed debconf stuff because after the decision to not precompile
the files the remove part must be callable. Otherwise you get trouble
with dpkg-reconfigure when the user decides to no more precompile the
files.
+ find has a cool feature, -delete removes the selected files, whit
this we can save a pipe :-)
+ find needs braces around the -name part otherwise the evaluation
stops at -o
* jed.prerm
+ we must remove the alternatives links for jed-script and jed _after_
the scripts in /usr/share/jed/compile/ are ran; otherwise they fail
* jed-common.postinst
+ run the compile script in any case, but select the parameter (install
or remove) upon the user wishes to precompile or not; this fixes the
case the user has selected precompile before and selects no with
dpkg-reconfigure
Modified: trunk/packages/jed/debian/compile
===================================================================
--- trunk/packages/jed/debian/compile 2005-07-01 12:39:04 UTC (rev 54)
+++ trunk/packages/jed/debian/compile 2005-07-03 12:12:44 UTC (rev 55)
@@ -3,19 +3,14 @@
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
+ jed-script $PREPARSE || true
+ # don't worry if jed-script is missing, because jed runs this scipt
+ # again at installation
;;
remove)
- find $LIBDIR -name \*.slc -o -name \*.dfa -print0 | xargs -0 rm -f
+ find $LIBDIR \( -name \*.slc -o -name \*.dfa \) -delete
;;
*)
echo "unknown argument --> \"$1"\" >&2
Modified: trunk/packages/jed/debian/jed-common.postinst
===================================================================
--- trunk/packages/jed/debian/jed-common.postinst 2005-07-01 12:39:04 UTC (rev 54)
+++ trunk/packages/jed/debian/jed-common.postinst 2005-07-03 12:12:44 UTC (rev 55)
@@ -10,18 +10,22 @@
TEMP=$(tempfile)
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"
+ DCONF_RET="$RET"
+ printf "Running /usr/share/jed/compile/jed-common..."
+ RET=0
+ if [ "$DCONF_RET" = true ]; then
+ /usr/share/jed/compile/jed-common install >$TEMP 2>&1
+ else
+ /usr/share/jed/compile/jed-common remove >$TEMP 2>&1
+ fi || RET=$?
- rm $TEMP
+ if test "$RET" -ne 0 ; then
+ echo "failed (see $TEMP)"
+ exit $RET
fi
+ echo "done"
+
+ rm $TEMP
;;
abort-upgrade|abort-remove|abort-deconfigure)
Modified: trunk/packages/jed/debian/jed.prerm
===================================================================
--- trunk/packages/jed/debian/jed.prerm 2005-07-01 12:39:04 UTC (rev 54)
+++ trunk/packages/jed/debian/jed.prerm 2005-07-03 12:12:44 UTC (rev 55)
@@ -1,8 +1,5 @@
#!/bin/sh
-update-alternatives --remove editor /usr/bin/jed
-update-alternatives --remove jed-script /usr/bin/jed
-
TEMP=$(tempfile)
RET=0
printf "Running files in /usr/share/jed/compile/..."
@@ -15,4 +12,8 @@
echo "done"
rm $TEMP
+# attention the scripts above may need jed-script or jed
+update-alternatives --remove editor /usr/bin/jed
+update-alternatives --remove jed-script /usr/bin/jed
+
#DEBHELPER#
Modified: trunk/packages/jed-extra/debian/compile
===================================================================
--- trunk/packages/jed-extra/debian/compile 2005-07-01 12:39:04 UTC (rev 54)
+++ trunk/packages/jed-extra/debian/compile 2005-07-03 12:12:44 UTC (rev 55)
@@ -3,16 +3,11 @@
LIBDIR=/usr/share/jed/site-lib
PREPARSE=jed-extra-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 $LIBDIR/$PREPARSE
+ jed-script $LIBDIR/$PREPARSE || true
+ # don't worry if jed-script is missing, because jed runs this scipt
+ # again at installation
;;
remove)
find $LIBDIR \( -name \*.slc -o -name \*.dfa \) -delete