reconfigure: Correctly re-throw SRFI-34 exceptions on Guile 3.
Previously, we'd just print an ugly backtrace when running on Guile 3 because the '%exception throw would not be caught anywhere. Reported by Arne Babenhauserheide <arne_bab@web.de> in <https://bugs.gnu.org/40496>. * guix/scripts/system/reconfigure.scm (install-bootloader-program): In 'catch' handler, match '%exception and use 'raise-exception' instead of 'throw' to rethrow in that case.
This commit is contained in:
		
							parent
							
								
									1c86577d62
								
							
						
					
					
						commit
						93add9bf7d
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -211,6 +211,7 @@ BOOTLOADER-PACKAGE."
 | 
			
		|||
                        (guix store)
 | 
			
		||||
                        (guix utils)
 | 
			
		||||
                        (ice-9 binary-ports)
 | 
			
		||||
                        (ice-9 match)
 | 
			
		||||
                        (srfi srfi-34)
 | 
			
		||||
                        (srfi srfi-35))
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -235,7 +236,11 @@ BOOTLOADER-PACKAGE."
 | 
			
		|||
                   (#$installer #$bootloader-package #$device #$target))
 | 
			
		||||
                 (lambda args
 | 
			
		||||
                   (delete-file new-gc-root)
 | 
			
		||||
                   (apply throw args))))
 | 
			
		||||
                   (match args
 | 
			
		||||
                     (('%exception exception)     ;Guile 3 SRFI-34 or similar
 | 
			
		||||
                      (raise-exception exception))
 | 
			
		||||
                     ((key . args)
 | 
			
		||||
                      (apply throw key args))))))
 | 
			
		||||
             ;; We are sure that the installation of the bootloader
 | 
			
		||||
             ;; succeeded, so we can replace the old GC root by the new
 | 
			
		||||
             ;; GC root now.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue