import: cran: Robustify cran-package?.
authorMathieu Othacehe <m.othacehe@gmail.com>
Thu, 4 May 2017 09:52:33 +0000 (11:52 +0200)
committerMathieu Othacehe <m.othacehe@gmail.com>
Sat, 13 May 2017 10:40:20 +0000 (12:40 +0200)
commitdb427602d8f993ee0025fa68d1af274aa8d69ab9
tree1404610f9662a09f5e81a6ff638ab16013b26b95
parenta5e8f5972cb0d69684bb3f81220a6408815f7fe0
import: cran: Robustify cran-package?.

* guix/import/cran.scm (package->upstream-name): Return #f if url
  start and end index could not be determined.
  (cran-package?): Check if the upstream-name can be extracted from
  given package.
* tests/cran.scm: Add "r-minimal is not a cran package" to make sure that
  r-minimal is not detected as a cran package.

This fixes a failure of guix refresh on r-minimal because no
upsteam-name can be determined from ".../R-version.tar.gz" uri.
guix/import/cran.scm
tests/cran.scm