CRUX

Welcome to CRUX bug tracking.
Tasklist

FS#130 - pkgmk cannot gzip hardlinked man pages

Attached to Project: CRUX
Opened by Tilman Sauerbeck (tilman) - Sunday, 12 November 2006, 10:38 GMT
Last edited by Johannes Winkelmann (jw) - Tuesday, 15 July 2008, 18:32 GMT
Task Type Bug Report
Category tools → pkgutils
Status Researching
Assigned To No-one
Operating System CRUX
Severity Low
Priority Normal
Reported Version Development
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

This is equivalent what pkgmk does to compress man pages:

$ touch foo
$ ln foo bar
$ gzip -9 foo
gzip: foo has 1 other link -- unchanged

This task depends upon

Comment by Mark Rosenstand (mark) - Sunday, 12 November 2006, 23:02 GMT
If you\'ve read the core ports, you\'ll see that often hardlinks are overwritten with symlinks, both for binaries and man pages. I\'m not sure why.

I think pkgmk should rename the files to have a .gz suffix in this case.
Comment by Manuel Tienza (Man0l0) - Wednesday, 16 July 2008, 17:10 GMT
--- pkgmk.in.orig 2008-07-16 18:53:40.000000000 +0200
+++ pkgmk.in 2008-07-16 18:54:34.000000000 +0200
@@ -283,7 +283,7 @@

find . -type f -path "*/man/man*/*" | while read FILE; do
if [ "$FILE" = "${FILE%%.gz}" ]; then
- gzip -9 "$FILE"
+ gzip -f -9 "$FILE"
fi
done
Comment by Juergen Daubert (jue) - Wednesday, 29 October 2008, 09:38 GMT
The proposed patch does not work in a proper way, because using the --force option with gzip breaks the hardlink and creates a copy of it. IMO there is no easy way to achieve what we want, because we basically must do the following:

- look for files with the same inode number
- remove all but one of them and remember their names
- gzip the other
- create the hardlinks with the stored names + .gz

Loading...