mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
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.
This commit is contained in:
parent
37d19403e7
commit
a3aa25f83d
1 changed files with 5 additions and 5 deletions
|
@ -173,9 +173,9 @@ Report bugs to: ~a.~%") "@PACKAGE_BUGREPORT@"))
|
||||||
(fetch uri port)
|
(fetch uri port)
|
||||||
(close port)
|
(close port)
|
||||||
(add-to-store store (basename (uri-path uri))
|
(add-to-store store (basename (uri-path uri))
|
||||||
#f #f "sha256" name))))
|
#t #f "sha256" name))))
|
||||||
(fmt (assq-ref opts 'format)))
|
(hash (call-with-input-file path
|
||||||
(format #t "~a~%~a~%"
|
(compose sha256 get-bytevector-all)))
|
||||||
path
|
(fmt (assq-ref opts 'format)))
|
||||||
(fmt (query-path-hash store path)))
|
(format #t "~a~%~a~%" path (fmt hash))
|
||||||
#t))
|
#t))
|
||||||
|
|
Loading…
Reference in a new issue