bin/129620: Incorrect bzip2 behavior
Jaakko Heinonen
jh at saunalahti.fi
Tue Dec 16 08:00:16 PST 2008
The following reply was made to PR bin/129620; it has been noted by GNATS.
From: Jaakko Heinonen <jh at saunalahti.fi>
To: Alex Keda <admin at lissyara.su>
Cc: bug-followup at FreeBSD.org
Subject: Re: bin/129620: Incorrect bzip2 behavior
Date: Tue, 16 Dec 2008 17:59:13 +0200
On 2008-12-13, Alex Keda wrote:
> acer# bzip2 --best --keep vmcore.9
> bzip2: Input file vmcore.9 has 1 other link.
> acer# bzip2 --best --keep --force vmcore.9
> acer# ll | grep core
> -rw------- 2 root wheel 206M 13 дек 22:41 vmcore.9
> -rw------- 1 root wheel 15M 13 дек 22:41 vmcore.9.bz2
> acer#
> ================
> I use '--keep' option. I think, not need check num links in this situation...
This patch should do it:
%%%
Index: contrib/bzip2/bzip2.c
===================================================================
--- contrib/bzip2/bzip2.c (revision 186035)
+++ contrib/bzip2/bzip2.c (working copy)
@@ -1208,7 +1208,7 @@ void compress ( Char *name )
return;
}
}
- if ( srcMode == SM_F2F && !forceOverwrite &&
+ if ( srcMode == SM_F2F && !forceOverwrite && !keepInputFiles &&
(n=countHardLinks ( inName )) > 0) {
fprintf ( stderr, "%s: Input file %s has %d other link%s.\n",
progName, inName, n, n > 1 ? "s" : "" );
%%%
Could you report this to bzip2 upstream? Looks like this behavior
exists in the latest upstream version.
--
Jaakko
More information about the freebsd-bugs
mailing list