fix(build): installing packages into the chroot fails for relative links

As the relative links are relative to the pkgctl invocations PWD and not
necessarily relative to the location where makechrootpkg is invoked from
this fails unexpectedly.

This commit fixes this by just using the full path when passing the
location to makechrootpkg.

Fixes https://gitlab.archlinux.org/archlinux/devtools/-/issues/181

Signed-off-by: Christian Heusel <christian@heusel.eu>
This commit is contained in:
Christian Heusel 2023-07-27 11:53:11 +02:00 committed by Levente Polyak
parent 5f4fd52e38
commit 9f7808c26e
No known key found for this signature in database
GPG Key ID: FC1B547C8D8172C8
1 changed files with 1 additions and 1 deletions

View File

@ -200,7 +200,7 @@ pkgctl_build() {
;;
-I|--install)
(( $# <= 1 )) && die "missing argument for %s" "$1"
MAKECHROOT_OPTIONS+=("-I" "$2")
MAKECHROOT_OPTIONS+=("-I" "$(realpath "$2")")
warning 'installing packages into the chroot may break reproducible builds, use with caution!'
shift 2
;;