Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pkg.add() fails #5612

Closed
lendle opened this issue Jan 30, 2014 · 9 comments
Closed

Pkg.add() fails #5612

lendle opened this issue Jan 30, 2014 · 9 comments
Labels
bug Indicates an unexpected problem or unintended behavior packages Package management and loading priority This should be addressed urgently regression Regression in behavior compared to a previous version

Comments

@lendle
Copy link
Contributor

lendle commented Jan 30, 2014

I tried adding a package after a fresh install and deleting $HOME/.julia and got the following error on both OS X and linux.

julia> Pkg.add("GLM")
INFO: Initializing package repository /Users/sam/.julia/v0.3
INFO: Cloning METADATA from git://github.com/JuliaLang/METADATA.jl
ERROR: realpath: No such file or directory
 in realpath at path.jl:127
 in mkcachedir at pkg/cache.jl:9
 in prefetch at pkg/cache.jl:34
 in resolve at pkg/entry.jl:388
 in resolve at pkg/entry.jl:363
 in edit at pkg/entry.jl:24
 in anonymous at multi.jl:1308

Looks like realpath doesn't like it when it's argument does not exist.
I tried replacing pkg/cache.jl line 9 with

cache = joinpath(realpath("."), ".cache")

and pkg/cache.jl line 16 with

rootcache = joinpath(realpath(pkgroot()), ".cache")

That seemed to solve the realpath issue (for me at least), but still no luck:

julia> Pkg.add("StatsBase")
INFO: Initializing package repository /Users/sam/.julia/v0.3
INFO: Cloning METADATA from git://github.com/JuliaLang/METADATA.jl
INFO: Cloning cache of StatsBase from git://github.com/JuliaStats/StatsBase.jl.git
INFO: Installing StatsBase v0.3.5
fatal: destination path 'StatsBase' already exists and is not an empty directory.
ERROR: failed process: Process(`git clone -q /Users/sam/.julia/v0.3/StatsBase StatsBase`, ProcessExited(128)) [128]
 in pipeline_error at process.jl:480
 in run at process.jl:457
 in install at pkg/write.jl:28
 in resolve at pkg/entry.jl:406
 in resolve at pkg/entry.jl:363
 in edit at pkg/entry.jl:24
 in anonymous at multi.jl:1308

Now it seems the issue is Cache.path, defined in dir.jl, is returning $HOME/v0.3/StatsBase instead of the git URL. Not sure what to do here.

By the way, the StatsBase directory exists and is not empty but looks like partial contents of a typical .git directory:

ls ~/.julia/v0.3/StatsBase
hooks  info  objects  refs  HEAD  config  description  packed-refs
@ihnorton
Copy link
Member

@kmsquire

@simonbyrne
Copy link
Contributor

I'm seeing this as well: also make test-pkg is failing. Currently this isn't included in make testall, and so not in travis: I'm assuming because it requires a network connection to function. Is there anyway could modify this so it could be included in the travis checks?

@kmsquire
Copy link
Member

Sorry, could someone please revert
64e24b0
64e24b011c6adc4977393ba8f1306d6dfbfc9492for
now? I can't get to it right this second, but will look at it later today.

On Thursday, January 30, 2014, Simon Byrne notifications@github.com wrote:

I'm seeing this as well: also make test-pkg is failing. Currently this
isn't included in make testall, and so not in travis: I'm assuming
because it requires a network connection to function. Is there anyway could
modify this so it could be included in the travis checks?


Reply to this email directly or view it on GitHubhttps://github.com//issues/5612#issuecomment-33695581
.

@staticfloat
Copy link
Member

Reverted in d869093

@ihnorton
Copy link
Member

Was just about to push a fix :/

@staticfloat
Copy link
Member

:P Feel free to revert my reversion, and then put your fix on top of that.

@kmsquire
Copy link
Member

Still one more issue needs fixing for unix.

@kmsquire kmsquire reopened this Jan 30, 2014
@kmsquire
Copy link
Member

(working on it)

@kmsquire
Copy link
Member

Closed by 9028e46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior packages Package management and loading priority This should be addressed urgently regression Regression in behavior compared to a previous version
Projects
None yet
Development

No branches or pull requests

5 participants