Skip to content
Snippets Groups Projects
Commit a3aa25f8 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

guix-download: Print the hash of the file's contents, no that of the path.

* guix-download.in (guix-download): Display the hash of the contents of
  PATH, not the path hash.  Also, call `add-to-store' with FIXED? = #t.
parent 37d19403
No related branches found
No related tags found
No related merge requests found
......@@ -173,9 +173,9 @@ Report bugs to: ~a.~%") "@PACKAGE_BUGREPORT@"))
(fetch uri port)
(close port)
(add-to-store store (basename (uri-path uri))
#f #f "sha256" name))))
(fmt (assq-ref opts 'format)))
(format #t "~a~%~a~%"
path
(fmt (query-path-hash store path)))
#t #f "sha256" name))))
(hash (call-with-input-file path
(compose sha256 get-bytevector-all)))
(fmt (assq-ref opts 'format)))
(format #t "~a~%~a~%" path (fmt hash))
#t))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment