• Status Researching
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category tools → pkgutils
  • Assigned To No-one
  • Operating System CRUX
  • Severity Low
  • Priority Very Low
  • Reported Version Development
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: CRUX
Opened by tilman - 12.11.2006
Last edited by jw - 15.07.2008

FS#130 - pkgmk cannot gzip hardlinked man pages

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

mark commented on 12.11.2006 23:02

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.

--- 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

Admin
jue commented on 29.10.2008 09:38

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...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing