Debian-Installer : package dependences problem (in main-menu)
Package: Debian-Installer
Version: CVS (24-04-2001)
Severity: normal
In function order(struct package_t *p, struct package_t **head, struct
package_t **tail) of main-menu.c (v1.26), parameter 'p' is part of a
linked list.
Code is :
-------------------------------------------
if (*head) {
(*tail)->next = *tail = p;
(*tail)->next = NULL;
}
else
*head = *tail = p;
-------------------------------------------
If package p as (for exemple) 1 dependence, then p->next = dependence
and p->next->next = NULL ==============> that's right
But if package p doesn't have any dependence, then p->next = rest of the
linked list. ==============> that's the problem
I changed it by :
------------------------------------------
if (*head) {
(*tail)->next = *tail = p;
(*tail)->next = NULL;
}
else {
*head = *tail = p;
(*tail)->next = NULL;
}
------------------------------------------
It seemed to solve the problem :)
main-menu.c.diff :
--- main-menu.c Thu Apr 26 13:01:50 2001
+++ main-menu-correct.c Thu Apr 26 13:02:39 2001
@@ -64,10 +64,12 @@
if (*head) {
(*tail)->next = *tail = p;
(*tail)->next = NULL;
}
- else
+ else {
*head = *tail = p;
+ (*tail)->next = NULL;
+ }
p->processed = 1;
}
-- System Information --
Debian Woody - kernel 2.4.3
Libc6-2.2.2
Reply to: