02ace28 pkgset: Hardlink downloaded packages

Authored and Committed by lsedlar 3 months ago
    pkgset: Hardlink downloaded packages
    When pungi-gather (or old pungi) download the packages from repos into
    work/$arch/, they are linked to work/global/. This was using link_type
    configuration option.
    However if that is set to symlink, we get a relative symlink in
    work/global/ which is later copied under the compose/ directory. Since
    it's a relative symlink, it gets broken by this.
    The fix is to hardlink the downloaded packages instead in the first
    step. Since both the source and destination are in work/ directory, we
    know it's the same volume and hardlinks should work. There is a fallback
    to copy just to be sure, but it shouldn't ever be used.
    Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>