guix hash: Allow '-r' as a non-deprecated alias.
This is a followup to 05c962594c.
Discussed at <https://issues.guix.gnu.org/51307#24>.
* guix/scripts/hash.scm (%options): Warn about deprecation for
"--recursive", but not for '-r' as it's a convenient shorthand.  Mention
'--serializer=nar' in the deprecation message.
* doc/guix.texi (Invoking guix hash): Adjust accordingly.
			
			
This commit is contained in:
		
							parent
							
								
									611989d1d6
								
							
						
					
					
						commit
						c1aa0ee9bd
					
				
					 2 changed files with 8 additions and 6 deletions
				
			
		| 
						 | 
					@ -11827,11 +11827,12 @@ in the definitions of packages.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@item --recursive
 | 
					@item --recursive
 | 
				
			||||||
@itemx -r
 | 
					@itemx -r
 | 
				
			||||||
This option is deprecated in favor of @option{--serializer}.  It is a
 | 
					The @option{--recursive} option is deprecated in favor of
 | 
				
			||||||
legacy alias for that with @var{type} set to @code{nar}.
 | 
					@option{--serializer=nar} (see below); @option{-r} remains accepted as a
 | 
				
			||||||
 | 
					convenient shorthand.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@item --serializer=@var{type}
 | 
					@item --serializer=@var{type}
 | 
				
			||||||
@itemx -S
 | 
					@itemx -S @var{type}
 | 
				
			||||||
Compute the hash on @var{file} using @var{type} serialization.
 | 
					Compute the hash on @var{file} using @var{type} serialization.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@var{type} may be one of the following:
 | 
					@var{type} may be one of the following:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
;;; GNU Guix --- Functional package management for GNU
 | 
					;;; GNU Guix --- Functional package management for GNU
 | 
				
			||||||
;;; Copyright © 2012, 2013, 2014, 2016, 2017, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
 | 
					;;; Copyright © 2012-2014, 2016-2017, 2020-2022 Ludovic Courtès <ludo@gnu.org>
 | 
				
			||||||
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
 | 
					;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
 | 
				
			||||||
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 | 
					;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 | 
				
			||||||
;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
 | 
					;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
 | 
				
			||||||
| 
						 | 
					@ -134,8 +134,9 @@ and 'base16' ('hex' and 'hexadecimal' can be used as well).\n"))
 | 
				
			||||||
                              (alist-delete 'format result))))
 | 
					                              (alist-delete 'format result))))
 | 
				
			||||||
        (option '(#\r "recursive") #f #f
 | 
					        (option '(#\r "recursive") #f #f
 | 
				
			||||||
                (lambda (opt name arg result)
 | 
					                (lambda (opt name arg result)
 | 
				
			||||||
 | 
					                  (unless (eqv? name #\r)
 | 
				
			||||||
                    (warning (G_ "'--recursive' is deprecated, \
 | 
					                    (warning (G_ "'--recursive' is deprecated, \
 | 
				
			||||||
use '--serializer' instead~%"))
 | 
					use '--serializer=nar' instead~%")))
 | 
				
			||||||
                  (alist-cons 'serializer nar-hash
 | 
					                  (alist-cons 'serializer nar-hash
 | 
				
			||||||
                              (alist-delete 'serializer result))))
 | 
					                              (alist-delete 'serializer result))))
 | 
				
			||||||
        (option '(#\S "serializer") #t #f
 | 
					        (option '(#\S "serializer") #t #f
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue