import/cran: Ensure current package is not among inputs.
* guix/import/cran.scm (cran-package-inputs): Remove the current package from the result.master
parent
52e0a77a1b
commit
a025d8fee6
|
@ -601,6 +601,7 @@ META."
|
||||||
"Return the list of <upstream-input> corresponding to all the dependencies
|
"Return the list of <upstream-input> corresponding to all the dependencies
|
||||||
of META, a package in REPOSITORY."
|
of META, a package in REPOSITORY."
|
||||||
(let* ((url (cran-package-source-url meta repository))
|
(let* ((url (cran-package-source-url meta repository))
|
||||||
|
(name (assoc-ref meta "Package"))
|
||||||
(source (download-source url
|
(source (download-source url
|
||||||
#:method
|
#:method
|
||||||
(cond ((assoc-ref meta 'git) 'git)
|
(cond ((assoc-ref meta 'git) 'git)
|
||||||
|
@ -608,7 +609,11 @@ of META, a package in REPOSITORY."
|
||||||
(else #f))))
|
(else #f))))
|
||||||
(tarball? (not (or (assoc-ref meta 'git)
|
(tarball? (not (or (assoc-ref meta 'git)
|
||||||
(assoc-ref meta 'hg)))))
|
(assoc-ref meta 'hg)))))
|
||||||
(sort (append (source->dependencies source tarball?)
|
(sort (filter
|
||||||
|
;; Prevent tight cycles.
|
||||||
|
(lambda (input)
|
||||||
|
((negate string=?) name (upstream-input-name input)))
|
||||||
|
(append (source->dependencies source tarball?)
|
||||||
(filter-map (lambda (name)
|
(filter-map (lambda (name)
|
||||||
(and (not (member name invalid-packages))
|
(and (not (member name invalid-packages))
|
||||||
(upstream-input
|
(upstream-input
|
||||||
|
@ -618,7 +623,7 @@ of META, a package in REPOSITORY."
|
||||||
(map string-downcase
|
(map string-downcase
|
||||||
(listify meta "SystemRequirements")))
|
(listify meta "SystemRequirements")))
|
||||||
(cran-package-propagated-inputs meta)
|
(cran-package-propagated-inputs meta)
|
||||||
(vignette-builders meta))
|
(vignette-builders meta)))
|
||||||
(lambda (input1 input2)
|
(lambda (input1 input2)
|
||||||
(string<? (upstream-input-downstream-name input1)
|
(string<? (upstream-input-downstream-name input1)
|
||||||
(upstream-input-downstream-name input2))))))
|
(upstream-input-downstream-name input2))))))
|
||||||
|
|
Reference in New Issue