Here's a patch

Index: status.c
===================================================================
RCS file: /cvs/debian-boot/debian-installer/main-menu/status.c,v
retrieving revision 1.16
diff -u -r1.16 status.c
--- status.c    2002/05/27 14:12:56     1.16
+++ status.c    2002/06/23 18:23:07
@@ -10,13 +10,24 @@
 #include <search.h>
 #include <locale.h>
 
+/* Check whether a package is installable */
+int isinstallable(char *name) {
+       char isinstallable[1024];
+       struct stat statbuf;
+
+       sprintf(isinstallable, DPKGDIR "info/%s.isinstallable", name);
+       if (stat(isinstallable, &statbuf) == 0)
+               return ! SYSTEM(isinstallable);
+       return 1;
+}
+
 /*
  * Read status file and generate and return a linked list of packages.
  */
 struct package_t *status_read(void) {
        FILE *f;
        char *b, buf[BUFSIZE], *lang_code, *lingua = NULL;
-       int i;
+       int i, skipping;
        struct package_t *found, *newp, *p = 0;
        struct language_description *langdesc;
 
@@ -37,9 +48,17 @@
        while (fgets(buf, BUFSIZE, f) && !feof(f)) {
                buf[strlen(buf)-1] = 0;
                if (strstr(buf, "Package: ") == buf) {
-                       newp = tree_add(buf + 9);
-                       newp->next = p;
-                       p = newp;
+                       char *name = buf + 9;
+                       if (!isinstallable(name)) {
+                               skipping  = 1
+                       } else {
+                               newp = tree_add(name);
+                               newp->next = p;
+                               p = newp;
+                               skipping = 0;
+                       }
+               } else if (skipping) {
+                       continue;
                }
                else if (strstr(buf, "installer-menu-item: ") == buf) {
                        p->installer_menu_item = atoi(buf + 21);


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to