Date: Tue, 2 Jan 2018 05:22:54 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327486 - head/usr.sbin/bsdinstall/distextract Message-ID: <201801020522.w025MsV2059640@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nwhitehorn Date: Tue Jan 2 05:22:54 2018 New Revision: 327486 URL: https://svnweb.freebsd.org/changeset/base/327486 Log: Skip errors from being unable to set modification and creation times. If one of the directories in the filesystem hierarchy is a FAT mountpoint, settings its times will fail, which would cause installation to abort. Instead, make this a best-effort thing. Handling this error is a hack and a better internal scheme for handling this should be added to libarchive. Modified: head/usr.sbin/bsdinstall/distextract/distextract.c Modified: head/usr.sbin/bsdinstall/distextract/distextract.c ============================================================================== --- head/usr.sbin/bsdinstall/distextract/distextract.c Tue Jan 2 04:35:56 2018 (r327485) +++ head/usr.sbin/bsdinstall/distextract/distextract.c Tue Jan 2 05:22:54 2018 (r327486) @@ -310,7 +310,15 @@ extract_files(struct dpv_file_node *file, int out __un archive = NULL; file->status = DPV_STATUS_DONE; return (100); - } else if (retval != ARCHIVE_OK) { + } else if (retval != ARCHIVE_OK && + !(retval == ARCHIVE_WARN && + strcmp(archive_error_string(archive), "Can't restore time") == 0)) { + /* + * Print any warning/error messages except inability to set + * ctime/mtime, which is not fatal, or even interesting, + * for our purposes. Would be nice if this were a libarchive + * option. + */ snprintf(errormsg, sizeof(errormsg), "Error while extracting %s: %s\n", file->name, archive_error_string(archive));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801020522.w025MsV2059640>