Skip to content
  • Sören Tempel's avatar
    abuild: rewrite hardlink handling when compressing man pages · e8e0b9e9
    Sören Tempel authored and Natanael Copa's avatar Natanael Copa committed
    The problem is that gzip refuses to run if it detects that a file has
    more than 1 link. Our existing solution (removing hardlinks, compressing
    the man page and recreating the hardlinks) made certain assumptions
    about inode order that are only given on Unix v7 like filesystems
    meaning it didn't work properly on 'tree-based' filesystems like BTRFS
    or ZFS.
    
    This patch has a different more bulletproof approach: It simply replaces
    all hardlinks with symlinks. This is way easier because symlinks (unlike
    hardlinks) can point to a file that doesn't exist, therefore we can
    update all links before compressing the file in an easy way.
    e8e0b9e9