gather: Resolve symlinks before linking packages
If we happen to have a symlink to an RPM that should be linked into the compose, we should first resolve it to the actual path. This avoids a problem if the symlink is relative, as otherwise Pungi would copy/link the actual relative symlink, which would break it in the new location. If the path is not a symlink, resolving the real path should make no difference. JIRA: RHELCMP-14504 Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
004f357acb
commit
859b968483
1 changed files with 3 additions and 3 deletions
|
|
@ -87,7 +87,7 @@ def link_files(compose, arch, variant, pkg_map, pkg_sets, manifest, srpm_map={})
|
|||
dst_relpath = os.path.join(packages_dir_relpath, package_path)
|
||||
|
||||
# link file
|
||||
pool.queue_put((pkg["path"], dst))
|
||||
pool.queue_put((os.path.realpath(pkg["path"]), dst))
|
||||
|
||||
# update rpm manifest
|
||||
pkg_obj = pkg_by_path[pkg["path"]]
|
||||
|
|
@ -116,7 +116,7 @@ def link_files(compose, arch, variant, pkg_map, pkg_sets, manifest, srpm_map={})
|
|||
dst_relpath = os.path.join(packages_dir_relpath, package_path)
|
||||
|
||||
# link file
|
||||
pool.queue_put((pkg["path"], dst))
|
||||
pool.queue_put((os.path.realpath(pkg["path"]), dst))
|
||||
|
||||
# update rpm manifest
|
||||
pkg_obj = pkg_by_path[pkg["path"]]
|
||||
|
|
@ -146,7 +146,7 @@ def link_files(compose, arch, variant, pkg_map, pkg_sets, manifest, srpm_map={})
|
|||
dst_relpath = os.path.join(packages_dir_relpath, package_path)
|
||||
|
||||
# link file
|
||||
pool.queue_put((pkg["path"], dst))
|
||||
pool.queue_put((os.path.realpath(pkg["path"]), dst))
|
||||
|
||||
# update rpm manifest
|
||||
pkg_obj = pkg_by_path[pkg["path"]]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue