kevva / kevva/decompress

ENOENT while extracting an tar with hardlinks

Open
#93 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
419
Forks
55
PR merge metrics
No merged PRs in 30d

Description

File: `gcc-arm-none-eabi-9-2020-q2-update-mac.tar.bz2` from https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads/9-2020-q2-update

```
[Error: ENOENT: no such file or directory, link './arm-none-eabi/lib/libg.a' -> '/Users/XiNGRZ/****/arm-none-eabi/lib/libc.a'] {
errno: -2,
code: 'ENOENT',
syscall: 'link',
path: './arm-none-eabi/lib/libg.a',
dest: '/Users/XiNGRZ/****/arm-none-eabi/lib/libc.a'
}
```

Just did some investigation and found:

https://github.com/kevva/decompress/blob/84a8c1046946add1a6ae01c54dbebf312e4ffc85/index.js#L121

I think `x.linkname` should be joined with the `output` path. Otherwise `fsPromises.symlink` can't find the target.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in index.js at the linked line and reproduce the failure with gcc-arm-none-eabi-9-2020-q2-update-mac.tar.bz2. Trace how the hardlink target is resolved relative to the extraction output, then verify that extracting the archive creates the expected libc.a link without ENOENT.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.