[Pkg-jed-commit] r489 - in jed/trunk/debian: . patches
Jörg Sommer
jo-guest at alioth.debian.org
Thu Jan 11 22:09:52 CET 2007
Author: jo-guest
Date: 2007-01-11 22:09:51 +0100 (Thu, 11 Jan 2007)
New Revision: 489
Modified:
jed/trunk/debian/jed-common.config
jed/trunk/debian/patches/fix-pymode-tab-space.dpatch
Log:
• debian/patches/fix-pymode-tab-space.dpatch
· Replaced “loop () insert_char(' ')” by “whitespace()” as suggested by
Günther Milde.
· Improved the description of the patch, e.g. explained the idea of the
patch.
• debian/jed-common.config
· Replaced the splitting of the file_N fields by shell expression (instead of
subprocess and pipe)
· The if condition “$changed = true” was false. It missed the []. But
because the values true and false are used, its enough to pass the value
of $changed to if.
· Postponed the load of the debconf function until it is decided that they
are needed.
· Removed the assignment of false to seen for the debconf question. I don't
see the reason why we must tag it everytime as not seen.
Modified: jed/trunk/debian/jed-common.config
===================================================================
--- jed/trunk/debian/jed-common.config 2007-01-11 14:26:44 UTC (rev 488)
+++ jed/trunk/debian/jed-common.config 2007-01-11 21:09:51 UTC (rev 489)
@@ -2,8 +2,6 @@
set -e
-. /usr/share/debconf/confmodule
-
# md5sums from jed-0.99.9 (potato)
file_1=38af7aa6498bfd7be927aa52c6c46585:/etc/jed-init.d/00site.sl
file_2=91a5aee61e23906dcfffd24904d7ef62:/etc/jed-init.d/99default.sl
@@ -36,8 +34,8 @@
for n in `seq 1 10` ; do
eval "tmp=\$file_$n"
- md5sum=`echo $tmp | cut -d: -f1`
- file=`echo $tmp | cut -d: -f2`
+ md5sum=${tmp%%:*}
+ file=${tmp##*:}
if [ -e $file ] ; then
if echo "$md5sum $file" | md5sum -c >/dev/null 2>&1 ; then
# The configuration file was not changed by the user: remove it
@@ -49,15 +47,15 @@
fi
done
-if $changed = true ; then
- db_fset jed-common/rm-site-defaults seen false
+if $changed; then
+ . /usr/share/debconf/confmodule
+
db_input medium jed-common/rm-site-defaults || true
db_go
db_get jed-common/rm-site-defaults
if [ "$RET" = true ] ; then
for n in `seq 1 10` ; do
- eval "tmp=\$file_$n"
- rm -f `echo $tmp | cut -d: -f2`
+ eval "rm -f \${file_$n##*:}"
done
- fi
+ fi
fi
Modified: jed/trunk/debian/patches/fix-pymode-tab-space.dpatch
===================================================================
--- jed/trunk/debian/patches/fix-pymode-tab-space.dpatch 2007-01-11 14:26:44 UTC (rev 488)
+++ jed/trunk/debian/patches/fix-pymode-tab-space.dpatch 2007-01-11 21:09:51 UTC (rev 489)
@@ -4,6 +4,14 @@
## DP: In Python, it is forbidden to mix up tabs and spaces as indention
## DP: characters. This patch enhances the python mode to take care of the
## DP: prefered indention character in a file. Fixes #305668
+##
+## The idea of the patch is to assume the user wants tabs as indent characters,
+## if he set the Py_Indent_Level to the value of TAB. (used for empty files)
+## This might be overwritten by the indention character used in the current
+## file. If the first line that starts with whitespace and is not part of """
+## ... """ or starts with # it overwrites the default selection. If this line
+## starts with a tab, tab is used as character for indention, otherwise spaces
+## are used.
@DPATCH@
diff -urNad trunk~/lib/pymode.sl trunk/lib/pymode.sl
@@ -16,7 +24,7 @@
+private define py_whitespace(cnt)
+{
+ if ( get_blocal_var("py_use_tab") )
-+ loop (cnt / TAB) insert_char('\t');
++ whitespace(cnt);
+ else
+ loop (cnt) insert_char(' ');
+}
More information about the Pkg-jed-commit
mailing list