refresh: Allow users to refer to specific package versions.
* guix/scripts/refresh.scm (guix-refresh): Use 'specification->package' instead of 'find-packages-by-name'. This allows users to specify things like "qt-4.8.6". * doc/guix.texi (Invoking guix refresh): Add an example.
This commit is contained in:
		
							parent
							
								
									77db91addc
								
							
						
					
					
						commit
						4b9b3cbbc4
					
				
					 2 changed files with 8 additions and 11 deletions
				
			
		| 
						 | 
					@ -3285,7 +3285,7 @@ In addition, @command{guix refresh} can be passed one or more package
 | 
				
			||||||
names, as in this example:
 | 
					names, as in this example:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@example
 | 
					@example
 | 
				
			||||||
guix refresh -u emacs idutils
 | 
					guix refresh -u emacs idutils gcc-4.8.4
 | 
				
			||||||
@end example
 | 
					@end example
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@noindent
 | 
					@noindent
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
;;; GNU Guix --- Functional package management for GNU
 | 
					;;; GNU Guix --- Functional package management for GNU
 | 
				
			||||||
;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
 | 
					;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
 | 
				
			||||||
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
 | 
					;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
 | 
				
			||||||
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 | 
					;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 | 
				
			||||||
;;;
 | 
					;;;
 | 
				
			||||||
| 
						 | 
					@ -207,16 +207,13 @@ update would trigger a complete rebuild."
 | 
				
			||||||
         (list-dependent? (assoc-ref opts 'list-dependent?))
 | 
					         (list-dependent? (assoc-ref opts 'list-dependent?))
 | 
				
			||||||
         (key-download    (assoc-ref opts 'key-download))
 | 
					         (key-download    (assoc-ref opts 'key-download))
 | 
				
			||||||
         (packages
 | 
					         (packages
 | 
				
			||||||
          (match (concatenate
 | 
					          (match (filter-map (match-lambda
 | 
				
			||||||
                  (filter-map (match-lambda
 | 
					                               (('argument . spec)
 | 
				
			||||||
                               (('argument . value)
 | 
					                                ;; Take either the specified version or the
 | 
				
			||||||
                                (let ((p (find-packages-by-name value)))
 | 
					                                ;; latest one.
 | 
				
			||||||
                                  (when (null? p)
 | 
					                                (specification->package spec))
 | 
				
			||||||
                                    (leave (_ "~a: no package by that name~%")
 | 
					 | 
				
			||||||
                                           value))
 | 
					 | 
				
			||||||
                                  p))
 | 
					 | 
				
			||||||
                               (_ #f))
 | 
					                               (_ #f))
 | 
				
			||||||
                              opts))
 | 
					                             opts)
 | 
				
			||||||
                 (()                          ; default to all packages
 | 
					                 (()                          ; default to all packages
 | 
				
			||||||
                  (let ((select? (match (assoc-ref opts 'select)
 | 
					                  (let ((select? (match (assoc-ref opts 'select)
 | 
				
			||||||
                                        ('core core-package?)
 | 
					                                        ('core core-package?)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue