Show the number of sets installed and the next set above the menu that

asks you where to load stuff from.
Initialise stuff so that 'install default set of sets' works.
Fix install loop, removing infinite loop if/when first kernel not selected.
This commit is contained in:
dsl 2006-01-15 20:41:00 +00:00
parent aab3fb05a5
commit afd41ad77a
8 changed files with 47 additions and 29 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: defs.h,v 1.124 2006/01/12 22:02:44 dsl Exp $ */
/* $NetBSD: defs.h,v 1.125 2006/01/15 20:41:00 dsl Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@ -394,6 +394,7 @@ int check_partitions(void);
void set_sizemultname_cyl(void);
void set_sizemultname_meg(void);
int check_lfs_progs(void);
void init_set_status(void);
void customise_sets(void);
void umount_mnt2(void);

View File

@ -1,4 +1,4 @@
/* $NetBSD: menus.mi,v 1.23 2006/01/12 22:02:44 dsl Exp $ */
/* $NetBSD: menus.mi,v 1.24 2006/01/15 20:41:00 dsl Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -210,8 +210,7 @@ menu sizechoice, sub menu, y=0, title MSG_Choose_your_size_specifier;
multname = msg_string(MSG_secname);
};
menu distmedium, title MSG_Select_medium, y=-1;
display action { umount_mnt2(); msg_display(MSG_distmedium); };
menu distmedium, title MSG_Select_medium, y=-5;
option MSG_cdrom, exit, action { *(int *)arg = get_via_cdrom(); };
option MSG_ftp, exit, action { *(int *)arg = get_via_ftp("ftp"); };
option MSG_http, exit, action { *(int *)arg = get_via_ftp("http"); };
@ -224,7 +223,7 @@ menu distmedium, title MSG_Select_medium, y=-1;
option MSG_Abandon, exit, action { *(int *)arg = SET_ABANDON; };
menu distset, title MSG_Select_your_distribution;
display action { msg_display (MSG_distset); };
display action { init_set_status(); msg_display (MSG_distset); };
option MSG_Full_installation, exit;
option MSG_Custom_installation, exit, action { customise_sets(); };

View File

@ -1,4 +1,4 @@
/* $NetBSD: msg.mi.de,v 1.25 2006/01/12 22:02:44 dsl Exp $ */
/* $NetBSD: msg.mi.de,v 1.26 2006/01/15 20:41:00 dsl Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@ -473,7 +473,10 @@ Distributionspakete. Wie im INSTALL Dokument beschrieben, haben Sie nun
mehrere Optionen.
Für FTP oder NFS müssen Sie mit einem Netzwerk verbunden sein und
Zugriff auf die entsprechenden Server haben.
}
Sets selected %d, processed %d. Next set %s.
} /* XXX translate last line */
message distset
{Die NetBSD Distribution ist in verschiedene Pakete aufgeteilt.

View File

@ -1,4 +1,4 @@
/* $NetBSD: msg.mi.en,v 1.139 2006/01/12 22:02:44 dsl Exp $ */
/* $NetBSD: msg.mi.en,v 1.140 2006/01/15 20:41:00 dsl Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@ -457,6 +457,9 @@ message distmedium
sets. As noted in your INSTALL notes, you have several options. For
ftp or nfs, you must be connected to a network with access to the proper
machines.
Sets selected %d, processed %d, Next set %s.
}
message distset
@ -987,7 +990,7 @@ message Use_Existing {Use existing partition sizes}
message Megabytes {Megabytes}
message Cylinders {Cylinders}
message Sectors {Sectors}
message Select_medium {Select medium}
message Select_medium {Install from}
message ftp {FTP}
message http {HTTP}
message nfs {NFS}

View File

@ -1,4 +1,4 @@
/* $NetBSD: msg.mi.es,v 1.9 2006/01/12 22:02:44 dsl Exp $ */
/* $NetBSD: msg.mi.es,v 1.10 2006/01/15 20:41:00 dsl Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@ -466,7 +466,10 @@ message distmedium
de la distribución. Como se apunta en las notas INSTALL, tiene diversas
opciones. Para ftp o nfs, tiene que estar conectado a una red con acceso
a las maquinas apropiadas.
}
Sets selected %d, processed %d. Next set %s.
} /* XXX translate last line */
message distset
{La distribución NetBSD está dividida en una colección de conjuntos de

View File

@ -1,4 +1,4 @@
/* $NetBSD: msg.mi.fr,v 1.88 2006/01/12 22:02:44 dsl Exp $ */
/* $NetBSD: msg.mi.fr,v 1.89 2006/01/15 20:41:00 dsl Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@ -460,7 +460,10 @@ Comme indiqu
plusieurs possibilités.
Pour une installation via nfs ou ftp, vous devez être
connecté au réseau et avoir accès au bon serveur.
}
Sets selected %d, processed %d. Next set %s.
} /* XXX translate last line */
message distset
{La distribution de NetBSD est découpée en plusieurs composants.

View File

@ -1,4 +1,4 @@
/* $NetBSD: msg.mi.pl,v 1.49 2006/01/12 22:02:44 dsl Exp $ */
/* $NetBSD: msg.mi.pl,v 1.50 2006/01/15 20:41:00 dsl Exp $ */
/* Based on english version: */
/* NetBSD: msg.mi.pl,v 1.36 2004/04/17 18:55:35 atatat Exp */
@ -447,7 +447,10 @@ message distmedium
{Twoj dysk jest teraz gotowy na zainstalowanie jadra oraz pakietow
dystrybucyjnych. Jak napisano w pliku INSTALL masz terz kilka opcji. Dla
ftp lub nfs, musisz byc podlaczony do sieci z dostepem do odpowidnich maszyn.
}
Sets selected %d, processed %d. Next set %s.
} /* XXX translate last line */
message distset
{Dystrybucja NetBSD jest rozbita w kolekcje pakietow dystrybucyjnych.

View File

@ -1,4 +1,4 @@
/* $NetBSD: util.c,v 1.139 2006/01/15 13:56:15 is Exp $ */
/* $NetBSD: util.c,v 1.140 2006/01/15 20:41:00 dsl Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@ -146,7 +146,7 @@ distinfo dist_list[] = {
static int check_for(unsigned int mode, const char *pathname);
static void
void
init_set_status(void)
{
const static uint8_t sets_valid[] = {MD_SETS_VALID};
@ -587,9 +587,6 @@ customise_sets(void)
int sets;
int menu_no;
/* Static initialisation is lazy, fix it now */
init_set_status();
msg_display(MSG_cur_distsets);
msg_table_add(MSG_cur_distsets_header);
@ -706,7 +703,7 @@ extract_dist(distinfo *dist, int update, int verbose)
set = dist->set;
(void)snprintf(fname, sizeof fname, "%s/%s%s",
ext_dir, dist->name + (*dist->name == '/'), dist_postfix);
ext_dir, dist->name, dist_postfix);
/* if extraction failed and user aborted, punt. */
return extract_file(dist, update, verbose, fname);
@ -761,8 +758,15 @@ get_and_unpack_sets(int update, msg setupdone_msg, msg success_msg, msg failure_
/* ask user whether to do normal or verbose extraction */
verbose = ask_verbose_dist(setupdone_msg);
/* Accurately count selected sets */
for (dist = dist_list; (set = dist->set) != SET_LAST; dist++) {
if ((set_status[set] & (SET_VALID | SET_SELECTED))
== (SET_VALID | SET_SELECTED))
tarstats.nselected++;
}
status = SET_RETRY;
for (dist = dist_list; ; dist += (status == SET_OK) ? 1 : 0) {
for (dist = dist_list; ; dist++) {
set = dist->set;
if (set == SET_LAST)
break;
@ -778,6 +782,10 @@ get_and_unpack_sets(int update, msg setupdone_msg, msg success_msg, msg failure_
wrefresh(stdscr);
/* Sort out the location of the set files */
do {
umount_mnt2();
msg_display(MSG_distmedium, tarstats.nselected,
tarstats.nsuccess + tarstats.nskipped,
dist->name);
fetch_fn = NULL;
process_menu(MENU_distmedium, &status);
} while (status == SET_RETRY);
@ -800,13 +808,8 @@ get_and_unpack_sets(int update, msg setupdone_msg, msg success_msg, msg failure_
/* Extract the distribution, retry from top on errors. */
status = extract_dist(dist, update, verbose);
}
/* Accurately count selected sets, nsuccess is correct already. */
for (dist = dist_list; (set = dist->set) != SET_LAST; dist++) {
if ((set_status[set] & (SET_VALID | SET_SELECTED))
== (SET_VALID | SET_SELECTED))
tarstats.nselected++;
if (status == SET_RETRY)
dist--;
}
if (tarstats.nerror == 0 && tarstats.nsuccess == tarstats.nselected) {