Colin Walters <[EMAIL PROTECTED]> writes:
> My fault. I think this patch should do the trick. Could someone
> apply it?
Might as well fix the other things I broke while I'm in there. This
patch supersedes the previous one. Lightly tested.
Index: utilities/dbootstrap/choose_medium.c
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/utilities/dbootstrap/choose_medium.c,v
retrieving revision 1.108
diff -u -r1.108 choose_medium.c
--- utilities/dbootstrap/choose_medium.c 2001/07/13 02:33:02 1.108
+++ utilities/dbootstrap/choose_medium.c 2001/07/17 04:56:30
@@ -422,9 +422,15 @@
free (mountpoint);
mountpoint = strdup (buffer);
}
- snprintf(prtbuf, sizeof(prtbuf),
- _("The installation program is building a list of all directories
containing the file '%s' that can be used to install %s."),
- pattern, descr);
+ if (backuppattern)
+ snprintf(prtbuf, sizeof(prtbuf),
+ _("The installation program is building a list of all
+directories containing a file '%s' or '%s' that can be used to install %s."),
+ pattern, backuppattern, descr);
+ else
+ snprintf(prtbuf, sizeof(prtbuf),
+ _("The installation program is building a list of all
+directories containing a file '%s' that can be used to install %s."),
+ pattern, descr);
+
pleaseWaitBox(prtbuf);
dirc = 0;
dirv = (char **) malloc(5 * sizeof(char *));
@@ -503,8 +509,12 @@
snprintf(prtbuf, sizeof(prtbuf),
_("The installation program couldn't find any directory
containing the files %s."), buffer);
} else {
- snprintf(prtbuf, sizeof(prtbuf),
- _("The installation program couldn't find any directory
containing the file %s."), pattern);
+ if (backuppattern)
+ snprintf(prtbuf, sizeof(prtbuf),
+ _("The installation program couldn't find any
+directory containing a file %s or %s."), backuppattern, pattern);
+ else
+ snprintf(prtbuf, sizeof(prtbuf),
+ _("The installation program couldn't find any
+directory containing the file %s."), pattern);
}
problemBox(prtbuf, _("File not found!"));
status = -1;
@@ -521,15 +531,27 @@
else if (status != DLG_OKAY) {
status = -1;
} else {
+ int found;
Archive_Dir = strdup(buffer);
snprintf(prtbuf, sizeof(prtbuf), "%s/%s", Archive_Dir,
pattern);
- /* FIXME: add support for backuppattern here */
- if (!NAME_ISREG(prtbuf, &statbuf)) {
+ found = NAME_ISREG(prtbuf, &statbuf);
+ if (!found && backuppattern) {
+ snprintf(prtbuf, sizeof(prtbuf), "%s/%s", Archive_Dir,
+ backuppattern);
+ found = NAME_ISREG(prtbuf, &statbuf);
+ }
+
+ if (!found) {
INFOMSG("manual dir specified for %s, but %s not found", descr,
prtbuf);
- snprintf(prtbuf, sizeof(prtbuf),
- _("%s does not contain the file %s that is needed to
install %s"),
- Archive_Dir, pattern, descr);
+ if (backuppattern)
+ snprintf(prtbuf, sizeof(prtbuf),
+ _("%s does not contain a file %s or %s that is needed
+to install %s"),
+ Archive_Dir, pattern, backuppattern, descr);
+ else
+ snprintf(prtbuf, sizeof(prtbuf),
+ _("%s does not contain the file %s that is needed to
+install %s"),
+ Archive_Dir, pattern, descr);
problemBox(prtbuf, _("File not found!"));
status = -1;
} else {
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]