Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/sysinst PR 54473: fix error prompt when a set file ...



details:   https://anonhg.NetBSD.org/src/rev/5cbe4eea151b
branches:  trunk
changeset: 964791:5cbe4eea151b
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Aug 17 17:51:19 2019 +0000

description:
PR 54473: fix error prompt when a set file is missing

diffstat:

 usr.sbin/sysinst/msg.mi.de |   7 +++++--
 usr.sbin/sysinst/msg.mi.en |   7 +++++--
 usr.sbin/sysinst/msg.mi.es |   7 +++++--
 usr.sbin/sysinst/msg.mi.fr |   7 +++++--
 usr.sbin/sysinst/msg.mi.pl |   7 +++++--
 usr.sbin/sysinst/util.c    |  29 +++++++++++++++++------------
 6 files changed, 42 insertions(+), 22 deletions(-)

diffs (156 lines):

diff -r 2bc95490c46a -r 5cbe4eea151b usr.sbin/sysinst/msg.mi.de
--- a/usr.sbin/sysinst/msg.mi.de        Sat Aug 17 17:03:32 2019 +0000
+++ b/usr.sbin/sysinst/msg.mi.de        Sat Aug 17 17:51:19 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msg.mi.de,v 1.14 2019/08/14 13:02:23 martin Exp $      */
+/*     $NetBSD: msg.mi.de,v 1.15 2019/08/17 17:51:19 martin Exp $      */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -679,8 +679,11 @@
 message delete_xfer_file
 {Nach der Installation löschen}
 
+/* Called with:                        Example
+ *  $0 = set name                      base
+ */
 message notarfile
-{Das Release-Paket %s existiert nicht.}
+{Das Release-Paket $0 existiert nicht.}
 
 message endtarok
 {Alle Distributionspakete wurden erfolgreich entpackt.}
diff -r 2bc95490c46a -r 5cbe4eea151b usr.sbin/sysinst/msg.mi.en
--- a/usr.sbin/sysinst/msg.mi.en        Sat Aug 17 17:03:32 2019 +0000
+++ b/usr.sbin/sysinst/msg.mi.en        Sat Aug 17 17:51:19 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msg.mi.en,v 1.20 2019/08/14 13:02:23 martin Exp $      */
+/*     $NetBSD: msg.mi.en,v 1.21 2019/08/17 17:51:19 martin Exp $      */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -652,8 +652,11 @@
 message delete_xfer_file
 {Delete after install}
 
+/* Called with:                        Example
+ *  $0 = set name                      base
+ */
 message notarfile
-{Release set %s does not exist.}
+{Release set $0 does not exist.}
 
 message endtarok
 {All selected distribution sets unpacked successfully.}
diff -r 2bc95490c46a -r 5cbe4eea151b usr.sbin/sysinst/msg.mi.es
--- a/usr.sbin/sysinst/msg.mi.es        Sat Aug 17 17:03:32 2019 +0000
+++ b/usr.sbin/sysinst/msg.mi.es        Sat Aug 17 17:51:19 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msg.mi.es,v 1.15 2019/08/14 13:02:23 martin Exp $      */
+/*     $NetBSD: msg.mi.es,v 1.16 2019/08/17 17:51:19 martin Exp $      */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -668,8 +668,11 @@
 message delete_xfer_file
 {A eliminar después de la instalación}
 
+/* Called with:                        Example
+ *  $0 = set name                      base
+ */
 message notarfile
-{El conjunto %s no existe.}
+{El conjunto $0 no existe.}
 
 message endtarok
 {Todos los conjuntos de distribución han sido desempaquetados
diff -r 2bc95490c46a -r 5cbe4eea151b usr.sbin/sysinst/msg.mi.fr
--- a/usr.sbin/sysinst/msg.mi.fr        Sat Aug 17 17:03:32 2019 +0000
+++ b/usr.sbin/sysinst/msg.mi.fr        Sat Aug 17 17:51:19 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msg.mi.fr,v 1.18 2019/08/14 13:02:23 martin Exp $      */
+/*     $NetBSD: msg.mi.fr,v 1.19 2019/08/17 17:51:19 martin Exp $      */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -684,8 +684,11 @@
 Effacer après l'installation
 }
 
+/* Called with:                        Example
+ *  $0 = set name                      base
+ */
 message notarfile
-{Le composant %s n'existe pas.}
+{Le composant $0 n'existe pas.}
 
 message endtarok
 {
diff -r 2bc95490c46a -r 5cbe4eea151b usr.sbin/sysinst/msg.mi.pl
--- a/usr.sbin/sysinst/msg.mi.pl        Sat Aug 17 17:03:32 2019 +0000
+++ b/usr.sbin/sysinst/msg.mi.pl        Sat Aug 17 17:51:19 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msg.mi.pl,v 1.21 2019/08/14 13:02:23 martin Exp $      */
+/*     $NetBSD: msg.mi.pl,v 1.22 2019/08/17 17:51:19 martin Exp $      */
 /*     Based on english version: */
 /*     NetBSD: msg.mi.pl,v 1.36 2004/04/17 18:55:35 atatat Exp       */
 
@@ -648,8 +648,11 @@
 message delete_xfer_file
 {Usun po zakonczeniu instalacji}
 
+/* Called with:                        Example
+ *  $0 = set name                      base
+ */
 message notarfile
-{Pakiet %s nie istnieje.}
+{Pakiet $0 nie istnieje.}
 
 message endtarok
 {Wszystkie wybrane pakiety dystrybucji zostaly rozpakowane.}
diff -r 2bc95490c46a -r 5cbe4eea151b usr.sbin/sysinst/util.c
--- a/usr.sbin/sysinst/util.c   Sat Aug 17 17:03:32 2019 +0000
+++ b/usr.sbin/sysinst/util.c   Sat Aug 17 17:51:19 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: util.c,v 1.29 2019/07/24 10:22:04 roy Exp $    */
+/*     $NetBSD: util.c,v 1.30 2019/08/17 17:51:19 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -916,20 +916,25 @@
        if (!file_exists_p(path)) {
 
 #ifdef SUPPORT_8_3_SOURCE_FILESYSTEM
-       /*
-        * Update path to use dist->name truncated to the first eight
-        * characters and check again
-        */
-       (void)snprintf(path, sizeof path, "%s/%.8s%.4s", /* 4 as includes '.' */
-           ext_dir_for_set(dist->name), dist->name, set_postfix(dist->name));
+               /*
+                * Update path to use dist->name truncated to the first eight
+                * characters and check again
+                */
+               (void)snprintf(path, sizeof path,
+                   "%s/%.8s%.4s", /* 4 as includes '.' */
+                   ext_dir_for_set(dist->name), dist->name,
+                   set_postfix(dist->name));
+
                if (!file_exists_p(path)) {
 #endif /* SUPPORT_8_3_SOURCE_FILESYSTEM */
-
-               tarstats.nnotfound++;
+                       tarstats.nnotfound++;
 
-               hit_enter_to_continue(MSG_notarfile, NULL);
-               return SET_RETRY;
-       }
+                       char *err = str_arg_subst(msg_string(MSG_notarfile),
+                           1, &dist->name);
+                       hit_enter_to_continue(err, NULL);
+                       free(err);
+                       return SET_RETRY;
+               }
 #ifdef SUPPORT_8_3_SOURCE_FILESYSTEM
        }
 #endif /* SUPPORT_8_3_SOURCE_FILESYSTEM */



Home | Main Index | Thread Index | Old Index