- Status Researching
- Percent Complete
- 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
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
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
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
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