Fix can't link XDEV using repos as pkgset_sources

Trying to compose from external classic repositories return an error trying the hardling from
a yum cache directory located in /tmp to the target directory in another filesystem.
This commit fixes this using the 'link' method form linker module which handle the link_type
configuration parameter instead of the hardcoded method 'hardlink'.

Change-Id: Ib79cfbd72f9def6462fddb2ae368730c55f257cd
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
This commit is contained in:
Romain Forlot 2021-04-22 14:03:12 +02:00
parent 00a9861367
commit da791ed15c

View File

@ -1029,7 +1029,7 @@ class Gather(GatherBase):
# Link downloaded package in (or link package from file repo) # Link downloaded package in (or link package from file repo)
try: try:
linker.hardlink(pkg.localPkg(), target) linker.link(pkg.localPkg(), target)
except Exception: except Exception:
self.logger.error("Unable to link %s from the yum cache." % pkg.name) self.logger.error("Unable to link %s from the yum cache." % pkg.name)
raise raise