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

Symbolic link command should use -f flag consistently #230

Closed
artemp opened this issue Aug 16, 2016 · 7 comments
Closed

Symbolic link command should use -f flag consistently #230

artemp opened this issue Aug 16, 2016 · 7 comments
Labels

Comments

@artemp
Copy link
Contributor

artemp commented Aug 16, 2016

https://travis-ci.org/mapnik/mapnik/jobs/152731996#L486

ln: failed to create symbolic link `/home/travis/build/mapnik/mapnik/mason_packages/.link/mason.ini': File exists

I'm getting bunch of errors like above which are temperamental. I think the solution is to always unlink before creating a symbolic link via -f flag.

/cc @springmeyer @kkaefer

@artemp artemp added the bug label Aug 16, 2016
@springmeyer
Copy link
Contributor

springmeyer commented Aug 17, 2016

The odd thing about this bug is that mason_packages/.link/mason.ini is not a file that should ever get created as far as I can tell. It may be that mason_config is getting called while the current working directory is not correct (or there is a race condition). The mason_config functionality was added in bfc612d but the bug is likely from #216 (which fixed other linking problems).

@kkaefer
Copy link
Contributor

kkaefer commented Aug 17, 2016

@springmeyer the mason.ini files are created as part of #176

@springmeyer
Copy link
Contributor

I see the problem now. The mason.ini for each package is being linked to the same place, so each packages tries to create .mason_packages/.link/mason.ini. This is because of the usage of lndir which creates "a shadow directory of symbolic links to another directory tree". The lndir command is used since it is way faster than ln -s per file. But with lndir we don't have control over ignoring files that would clobber each other across packages. Hmmmm.

springmeyer pushed a commit to mapnik/mapnik that referenced this issue Aug 26, 2016
@springmeyer
Copy link
Contributor

@kkaefer what do you think about storing mason.ini at ${MASON_PREFIX}/<package-name>.ini instead of ${MASON_PREFIX}/mason.ini. That would be a breaking change of course, but it would allow the ini config to be used within a linked/collapsed directory structure.

@kkaefer
Copy link
Contributor

kkaefer commented Mar 8, 2017

While we could rename it, we decided to deprecate linking

springmeyer pushed a commit to mapbox/mason-js that referenced this issue Dec 16, 2017
millzpaugh added a commit to mapbox/mason-js that referenced this issue Dec 18, 2017
* trials

* fix piping issue

* rm unnecessary console log

* rm more logs

* ignore 'mason.ini' files when linking due to mapbox/mason#230

* flatter structure in the .link folder

* fully synchronous package fetching
@lightmare
Copy link
Collaborator

This can be closed as per the above-mentioned PR.

@springmeyer
Copy link
Contributor

Thanks @lightmare!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants