fix(build): allow using --install and --offload simultaneously

Don't take the full (local) path of the package to install when using
--offload.

Fixes #194
Component: pkgctl build
This commit is contained in:
Antonio Rojas 2023-10-13 20:13:31 +00:00 committed by Levente Polyak
parent 6f106e7cd6
commit 5cbe9ad612
No known key found for this signature in database
GPG Key ID: FC1B547C8D8172C8
1 changed files with 5 additions and 1 deletions

View File

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