On Wed, Feb 11, 2004 at 09:50:07PM -0500, Joey Hess wrote: > Matt Kraai wrote: > > anna does not install bterm-unifont because its priority is > > optional. This causes missing characters in some languages. > > There went another 5.5 mb of memory. No more 32 MB installs. :-(
Sorry. > Is there something we can do about this? It would compress to 786k, > which is still huge, probably increases bterm's memory footprint too, > and it's not needed for 90% of installations AFAIK, only > chinese/japanese/etc. > > Maybe come up with a way to only install it if it's needed? How about adding an anna-install command, and having languagechooser or countrychooser call it if necessary? I've attached a prototype. -- Matt Kraai [EMAIL PROTECTED] http://ftbfs.org/
Index: anna/anna.c =================================================================== RCS file: /cvsroot/d-i/debian-installer/anna/anna.c,v retrieving revision 1.69 diff -u -r1.69 anna.c --- anna/anna.c 17 Jan 2004 14:58:47 -0000 1.69 +++ anna/anna.c 12 Feb 2004 03:33:05 -0000 @@ -42,6 +42,26 @@ return 0; } +static int +is_queued(di_package *package) +{ + FILE *fp; + char buf[1024]; + + if ((fp = fopen("/var/lib/anna-install/queue")) != NULL) { + while (fgets(buf, sizeof(buf), fp)) { + buf[strlen(buf) - 1] = '\0'; + + if (strcmp(buf, package->package) == 0) { + fclose(fp); + return 1; + } + } + fclose(fp); + } + + return 0; +} static int choose_modules(di_packages *status, di_packages **packages, di_packages_allocator **packages_allocator) @@ -112,7 +132,7 @@ } else if (package_kernel) continue; - if (package->priority >= di_package_priority_standard) + if (package->priority >= di_package_priority_standard || is_queued(package)) { package->status_want = di_package_status_want_install; di_log (DI_LOG_LEVEL_DEBUG, "install %s, priority >= standard", package->package); Index: anna/debian/changelog =================================================================== RCS file: /cvsroot/d-i/debian-installer/anna/debian/changelog,v retrieving revision 1.235 diff -u -r1.235 changelog --- anna/debian/changelog 10 Feb 2004 21:36:28 -0000 1.235 +++ anna/debian/changelog 12 Feb 2004 03:33:09 -0000 @@ -23,6 +23,8 @@ * Joey Hess - convert to debhelper v4 - use new debhelper udeb support + * Matt Kraai + - Install packages queued by anna-install. -- Christian Perrier <[EMAIL PROTECTED]> Sun, 8 Feb 2004 20:26:27 +0100 Index: rootskel/debian/changelog =================================================================== RCS file: /cvsroot/d-i/debian-installer/rootskel/debian/changelog,v retrieving revision 1.183 diff -u -r1.183 changelog --- rootskel/debian/changelog 10 Feb 2004 21:41:22 -0000 1.183 +++ rootskel/debian/changelog 12 Feb 2004 03:33:15 -0000 @@ -2,6 +2,7 @@ * Matt Kraai - Remove the first devfs mount in init.bootfloppy. + - Add anna-install. * Joey Hess - Update to debhelper v4, use udeb support, simplfy templates creation. Index: rootskel/src/bin/Makefile =================================================================== RCS file: /cvsroot/d-i/debian-installer/rootskel/src/bin/Makefile,v retrieving revision 1.2 diff -u -r1.2 Makefile --- rootskel/src/bin/Makefile 8 Dec 2003 21:52:30 -0000 1.2 +++ rootskel/src/bin/Makefile 12 Feb 2004 03:33:15 -0000 @@ -1,5 +1,5 @@ dir = bin -files_exec = $(wildcard apt*) $(wildcard debconf*) register-module +files_exec = anna-install $(wildcard apt*) $(wildcard debconf*) register-module include ../Makefile.inc Index: rootskel/src/bin/anna-install =================================================================== RCS file: rootskel/src/bin/anna-install diff -N rootskel/src/bin/anna-install --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ rootskel/src/bin/anna-install 12 Feb 2004 03:33:15 -0000 @@ -0,0 +1,13 @@ +#!/bin/sh -e + +log=/var/log/messages +queue=/var/lib/anna-install/queue + +# Add to list of extra packages (to be) installed into /target/. +mkdir -p /var/lib/anna-install +touch $queue +for pkg in $@ ; do + if ! grep -q "^$pkg$" $queue; then + echo "$pkg" >> $queue + fi +done