build-system/gnu: Tolerate errors during the 'strip' phase.
This is a followup to commit9a87649c86. * guix/build/gnu-build-system.scm (strip)[strip-dir]: If an invoke error occurs, issue a warning and continue to the next file. This restores the tolerance of stripping errors prior to commit9a87649.
This commit is contained in:
		
							parent
							
								
									cbdfa50d9f
								
							
						
					
					
						commit
						99aaeaa00b
					
				
					 1 changed files with 21 additions and 8 deletions
				
			
		| 
						 | 
					@ -27,6 +27,8 @@
 | 
				
			||||||
  #:use-module (ice-9 format)
 | 
					  #:use-module (ice-9 format)
 | 
				
			||||||
  #:use-module (srfi srfi-1)
 | 
					  #:use-module (srfi srfi-1)
 | 
				
			||||||
  #:use-module (srfi srfi-19)
 | 
					  #:use-module (srfi srfi-19)
 | 
				
			||||||
 | 
					  #:use-module (srfi srfi-34)
 | 
				
			||||||
 | 
					  #:use-module (srfi srfi-35)
 | 
				
			||||||
  #:use-module (srfi srfi-26)
 | 
					  #:use-module (srfi srfi-26)
 | 
				
			||||||
  #:use-module (rnrs io ports)
 | 
					  #:use-module (rnrs io ports)
 | 
				
			||||||
  #:export (%standard-phases
 | 
					  #:export (%standard-phases
 | 
				
			||||||
| 
						 | 
					@ -437,6 +439,17 @@ makefiles."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    (for-each (lambda (file)
 | 
					    (for-each (lambda (file)
 | 
				
			||||||
                (when (or (elf-file? file) (ar-file? file))
 | 
					                (when (or (elf-file? file) (ar-file? file))
 | 
				
			||||||
 | 
					                  ;; If an error occurs while processing a file, issue a
 | 
				
			||||||
 | 
					                  ;; warning and continue to the next file.
 | 
				
			||||||
 | 
					                  (guard (c ((invoke-error? c)
 | 
				
			||||||
 | 
					                             (format (current-error-port)
 | 
				
			||||||
 | 
					                                     "warning: ~a: program ~s exited\
 | 
				
			||||||
 | 
					~@[ with non-zero exit status ~a~]\
 | 
				
			||||||
 | 
					~@[ terminated by signal ~a~]~%"
 | 
				
			||||||
 | 
					                                     file
 | 
				
			||||||
 | 
					                                     (invoke-error-program c)
 | 
				
			||||||
 | 
					                                     (invoke-error-exit-status c)
 | 
				
			||||||
 | 
					                                     (invoke-error-term-signal c))))
 | 
				
			||||||
                    (when debug-output
 | 
					                    (when debug-output
 | 
				
			||||||
                      (make-debug-file file))
 | 
					                      (make-debug-file file))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -447,7 +460,7 @@ makefiles."
 | 
				
			||||||
                           (append strip-flags (list file)))
 | 
					                           (append strip-flags (list file)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    (when debug-output
 | 
					                    (when debug-output
 | 
				
			||||||
                    (add-debug-link file))))
 | 
					                      (add-debug-link file)))))
 | 
				
			||||||
              (find-files dir
 | 
					              (find-files dir
 | 
				
			||||||
                          (lambda (file stat)
 | 
					                          (lambda (file stat)
 | 
				
			||||||
                            ;; Ignore symlinks such as:
 | 
					                            ;; Ignore symlinks such as:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue