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

Re: localising base-config - end game



[Eduard Bloch]
> Yes. But I still don't see why you need the massive changes in
> dbootstrap if base-config is doing the job.

The following patch should do the job, assuming the debconf and
locales package is available.

Hm, perhaps base-config need to reconfigure debconf if it was
installed by debootstrap?  My previous patch for base-config did not
implement that.

Index: extract_base.c
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/utilities/dbootstrap/extract_base.c,v
retrieving revision 1.73
diff -u -3 -p -u -r1.73 extract_base.c
--- extract_base.c	2002/03/05 19:18:01	1.73
+++ extract_base.c	2002/03/09 20:23:14
@@ -249,11 +249,12 @@ exec_debootstrap(char **argv){
 int 
 debootstrap_extract_base (void) {
   int rs=0;
-  char *argv[8];
+  char *argv[9];
   struct stat statbuf;
   char *source;
   char filename [512];
   int status;
+  int argnum;
 
   /* Sanity Check */
   if (NAME_ISREG ("/target/etc/debian_version", &statbuf)) {
@@ -328,17 +329,25 @@ debootstrap_extract_base (void) {
       snprintf(prtbuf, sizeof prtbuf, "file:%s", Archive_Dir); 
       source = strdup(prtbuf);
   }
-  argv[0] = "/usr/sbin/debootstrap";
-  argv[1] = "--boot-floppies";
-  argv[2] = "--arch";
-  argv[3] = ARCHNAME;
-  argv[4] = "woody";
-  argv[5] = "/target";
-  argv[6] = source;
-  argv[7] = NULL;
+
+  argnum = 0;
+  argv[argnum++] = "/usr/sbin/debootstrap";
+  argv[argnum++] = "--boot-floppies";
+#ifdef USE_LANGUAGE_CHOOSER
+  /* Needed to generate locale data */
+  /* Hm, need to make sure these packages are available */
+  argv[argnum++] = "--include=debconf,locales";
+#endif /* USE_LANGUAGE_CHOOSER */
+  argv[argnum++] = "--arch";
+  argv[argnum++] = ARCHNAME;
+  argv[argnum++] = "woody";
+  argv[argnum++] = "/target";
+  argv[argnum++] = source;
+  argv[argnum++] = NULL;
   
-  INFOMSG("running '%s %s %s %s %s %s %s'",
-          argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]);
+  INFOMSG("running '%s %s %s %s %s %s %s %s'",
+          argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6],
+          argv[7] ? arv[7] : "(null)");
 
   rs = exec_debootstrap(argv);
 



Reply to: