@@ -812,15 +812,14 @@ install.packages <-
812812	if (verbose ) message(gettextf(" files: %s" 
813813                                     paste(files , collapse = " , \n\t " 
814814                            domain  =  NA )
815-         update  <-  cbind(update [found , , drop = FALSE ], file  =  files )
815+         update  <-  cbind(update [found , , drop = FALSE ], file  =  files ,  status   =   " " 
816816        if (nrow(update ) >  1L ) {
817817            upkgs  <-  unique(pkgs  <-  update [, 1L ])
818818            DL  <-  .make_dependency_list(upkgs , available )
819819            p0  <-  .find_install_order(upkgs , DL )
820820            # # can't use update[p0, ] due to possible multiple matches
821821            update  <-  update [sort.list(match(pkgs , p0 )), ]
822822        }
823- 
824823        if  (Ncpus  >  1L  &&  nrow(update ) >  1L ) {
825824            tlim_cmd  <-  character ()
826825            if (tlim  >  0 ) {
@@ -901,6 +900,7 @@ install.packages <-
901900                # # Try to figure out which
902901                pkgs  <-  update [, 1L ]
903902                tss  <-  sub(" [.]ts$" " " " ." pattern  =  " [.]ts$" 
903+                 update [! pkgs  %in%  tss , 4L ] <-  " FAIL" 
904904                failed  <-  pkgs [! pkgs  %in%  tss ]
905905                for  (pkg  in  failed ) {
906906                    # # targets with failed dependencies are not made (even with -k)
@@ -957,10 +957,12 @@ install.packages <-
957957                # # if this times out it will leave locks behind
958958                if (! quiet  &&  keep_outputs )
959959                    writeLines(readLines(outfile ))
960-                 if (status  >  0L )
960+                 if (status  >  0L ){ 
961961                    warning(gettextf(" installation of package %s had non-zero exit status" 
962962                                     sQuote(update [i , 1L ])),
963963                            domain  =  NA )
964+                     update [i , 4L ] <-  " FAIL" 
965+                 }
964966		else  if (verbose ) {
965967                    cmd  <-  paste(c(cmd0 , args ), collapse  =  "  " 
966968                    message(sprintf(" %d): succeeded '%s'" i , cmd ),
@@ -971,17 +973,18 @@ install.packages <-
971973                file.copy(outfiles , outdir , overwrite  =  TRUE )
972974            unlink(tmpd2 , recursive  =  TRUE )
973975        }
974-         # # Using stderr is the wish of PR#16420
975-         if (! quiet  &&  nonlocalrepos  &&  ! is.null(tmpd ) &&  is.null(destdir ))
976-             cat(" \n " " The downloaded source packages are in\n\t %s" 
977-                                sQuote(normalizePath(tmpd , mustWork  =  FALSE ))),
978-                 " \n " sep  =  " " file  =  stderr())
979976        # # update packages.html on Unix only if .Library was installed into
980977        libs_used  <-  unique(update [, 2L ])
981978        if (.Platform $ OS.type  ==  " unix" &&  .Library  %in%  libs_used ) {
982979            message(" Updating HTML index of packages in '.Library'" 
983980            make.packages.html(.Library )
984981        }
982+         # # Using stderr is the wish of PR#16420
983+         if (! quiet  &&  nonlocalrepos  &&  ! is.null(tmpd ) &&  is.null(destdir ))
984+             cat(" \n " " Installed %d packages in\n\t %s" update [, 4L ] !=  " FAIL" 
985+                 paste(sQuote(normalizePath(libs_used , mustWork  =  FALSE )), collapse  =  " \n\t " 
986+                 " \n " sep  =  " " file  =  stderr())
987+ 
985988    } else  if (! is.null(tmpd ) &&  is.null(destdir )) unlink(tmpd , TRUE )
986989
987990    invisible ()
0 commit comments