question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bad hardlink in 3.1 source tarball

See original GitHub issue

Thanks for all the work put into this version; unfortunately I did not have time to test the release candidates. Unpacking the source (on Linux) results in the following error:

> tar xf astropy-3.1.tar.gz
tar: astropy-3.1/astropy/CITATION: Cannot hard link to `astropy-3.1/CITATION': Operation not permitted
tar: Exiting with failure status due to previous errors

Everything except for the link in astropy/ is present, so setup.py build subsequently fails with

Traceback (most recent call last):
  File "setup.py", line 26, in <module>
    import astropy
  File "/beegfs/home/hd/hd_hd/hd_qc666/build/python/astropy-3.1/astropy/__init__.py", line 274, in <module>
    __citation__ = __bibtex__ = _get_bibtex()
  File "/beegfs/home/hd/hd_hd/hd_qc666/build/python/astropy-3.1/astropy/__init__.py", line 267, in _get_bibtex
    with open(citation_file, 'r') as citation:
FileNotFoundError: [Errno 2] No such file or directory: '/beegfs/home/hd/hd_hd/hd_qc129/build/python/astropy-3.1/astropy/CITATION'

This requires manually running ln -s ../CITATION from the ./astropy/ subdir before the build proceeds.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:18 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
dhomeiercommented, Nov 2, 2019

@plim, sorry haven’t done so yet. I no longer have access to the cluster using BeeGFS and thus cannot test anything, but I checked that the 3.2.3 tarball still contains the hardlink. So assuming setup still requires both instances of CITATION, I suppose I can document the current state of things and the workaround of manually creating the link. Unfortunately I cannot investigate now if the same problem pops up when installing from source using pip, and how to fix the link in that case - installing explicitly from the GitHub release should probably do.

Wondering if known_issues.rst is actually the best place to put this, or rather the Building from Source section in install.rst

1reaction
dhomeiercommented, Jan 16, 2019

That’s in fact strange - I’ve now tested this with the 3.1 and 3.1.1 releases and the latest HEAD on Linux, and setup.py sdist actually lets this always end up as a soft link in the tarball, although it reports tons of messages about creating hard links…

making hard links in astropy-3.2.dev23748...
hard linking .astropy-root -> astropy-3.2.dev23748
hard linking CHANGES.rst -> astropy-3.2.dev23748
hard linking CITATION -> astropy-3.2.dev23748
hard linking LICENSE.rst -> astropy-3.2.dev23748
hard linking README.rst -> astropy-3.2.dev23748
hard linking ah_bootstrap.py -> astropy-3.2.dev23748
hard linking pip-requirements -> astropy-3.2.dev23748
hard linking setup.cfg -> astropy-3.2.dev23748
hard linking setup.py -> astropy-3.2.dev23748
hard linking astropy/CITATION -> astropy-3.2.dev23748/astropy

when only CITATION comes out as a (soft) link at all:

-rw-r-----  1 derek 342746 Jan 16 23:39 CHANGES.rst
lrwxrwxrwx  1 derek     16 Dec  6 10:01 CITATION -> astropy/CITATION

Thus my speculation that pypi.org is creating their tarballs somewhat differently. Maybe distutils just has a different concept of hard link than Unix in general.

But anyway, not much we can do about the actual thing either way, so I’ll go ahead at last with a PR to document this in known_issues.rst.

Read more comments on GitHub >

github_iconTop Results From Across the Web

rsync, 'uid/gid impossible to set' cases cause future hard link ...
In my case this won't work since my destination (WD MyCloud) uses 3.0.9. OR. Change the rsync source code with gcc running under...
Read more >
Link Shell Extension (LSE)
Files can be hard linked to the same folder as the source folder. Because two directory entries cannot have the same name, LSE...
Read more >
Operation not permitted when creating hard link (but soft link ...
Hard links must be for files on the same filesystem. (But this usually says Invalid cross-device link · Only some filesystems (such as...
Read more >
How can I use rsync to duplicate a directory tree, creating ...
I have no hardlinks to preserve in my source tree, I just want a simple copy of my source tree where in the...
Read more >
What are hard links in Linux? - Quora
A hard link is a mapping from a directory entry to an inode. ... The ln command in Linux creates links between source...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found