[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH,RFC] Fetch c-s translations from xkeyboard-config.



Samuel Thibault, le Wed 01 Apr 2009 11:31:24 +0200, a écrit :
> I've just tested within the debian installer.  Some things I assumed
> were available actually aren't, so here is a fixed patch.  However the
> keyboard layout doesn't get changed, I haven't investigated why yet.

Nothing to do with my patch, the problem is just
that console-setup.config finishes by exit 0 while
console-setup-udeb.postinst sources it, and thus the postinst exits
without writing /etc/default/console-setup and calling setupcon...

Is there are reason for sourcing the config script instead of running it
with sh?  (it seems to work)

Also, "which" is not available in d-i, type should be used instead.

See attached patch.

I've put a resulting x86_64 mini.iso on
http://dept-info.labri.fr/~thibault/tmp/mini.iso

Samuel
Index: debian/console-setup.postinst
===================================================================
--- debian/console-setup.postinst	(révision 58053)
+++ debian/console-setup.postinst	(copie de travail)
@@ -28,7 +28,7 @@
 
 # In d-i the config script is not executed automatically
 if [ -f /usr/share/console-setup-mini/console-setup.config ]; then
-    . /usr/share/console-setup-mini/console-setup.config
+    sh /usr/share/console-setup-mini/console-setup.config
 fi
 
 CONFIGDIR=/etc/console-setup
Index: debian/config.proto
===================================================================
--- debian/config.proto	(révision 58053)
+++ debian/config.proto	(copie de travail)
@@ -221,7 +221,7 @@
 guess_arch () {
     local arch subarch line
 
-    if which archdetect >/dev/null; then
+    if type archdetect >/dev/null; then
 	archdetect
 	return 0
     fi
@@ -309,7 +310,7 @@
 	sed 's/[*].*//'
 }
 
-if which locale >/dev/null; then
+if type locale >/dev/null; then
     eval `locale`
 fi
 
@@ -974,7 +987,7 @@
 elif [ "$locale" = C ]; then
     default_charmap=UTF-8
     charmap_priority=high
-elif which locale >/dev/null; then
+elif type locale >/dev/null; then
     default_charmap=`locale charmap`
 else
     default_charmap=unknown
@@ -1168,7 +1181,7 @@
 fi
 
 # Get default layout from xorg.conf if available
-if [ -f /etc/X11/xorg.conf ] && which awk >/dev/null; then
+if [ -f /etc/X11/xorg.conf ] && type awk >/dev/null; then
     awk_expr='
 {
     $0 = tolower($0);

Reply to: