Bug 25719 - uncompress with soft and hard links
Summary: uncompress with soft and hard links
Status: UNCONFIRMED
Alias: None
Product: bzip2
Classification: Unclassified
Component: bzip2 (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-24 15:15 UTC by Guillaume Audirac
Modified: 2020-03-24 15:15 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume Audirac 2020-03-24 15:15:32 UTC
Hi,

I've got issues with bzip2 when using symbolic and hard links (quite useful for Yocto generated images).
I'm using Linux Mint 19.3 and bzip2 version 1.0.6 (6-sept-2010). I know the latest release is 1.0.8 but I could not find any related info in git log history.

# I have a bz2 file and soft and hard links to it.
$ ln -s my_file.bz2 my_softlink
$ ln my_file.bz2 my_hardlink

# Then I try to uncompress it through the symbolic link
$ bzip2 -d my_softlink
bzip2: Input file my_softlink is not a normal file.

# Now I try to uncompress it using the hard link
$ bzip2 -d my_hardlink
bzip2: Can't guess original name for my_hardlink -- using my_hardlink.out
bzip2: Input file my_hardlink has 1 other link.

For the 2 cases, using the -k option does not help.
For soft links, it would be nice to allow to follow the symlink with another option, while keeping the input file ('-k').
For hard links, I assume it should work with '-k' when uncompressing.

Regards.