>>>>> On Wed, 19 Apr 2017, Michał Górny wrote:

> Add an additional conditional to the dosym Prefix hack to ensure that
> the symlink is not using double Prefix when the ebuild uses ${EPREFIX}
> explicitly. This ensures that Portage on Prefix systems is both
> compatible with the ebuilds relying on the hack, and using dosym
> in the PMS-defined manner.
 
 
>  destdir=${2%/*}
>  [[ ! -d ${ED}${destdir} ]] && dodir "${destdir}"
> -# when absolute, prefix with offset for Gentoo Prefix
>  target="${1}"
> -[[ ${target:0:1} == "/" ]] && target="${EPREFIX}${target}"
> +# DEPRECATED HACK: when absolute, prefix with offset for Gentoo Prefix
> +# (but only if ${EPREFIX} is not there already)

Maybe add a date (like 2018-04-30) to the comment after which the code
can be removed?

> +if [[ ${target:0:1} == "/" && ${target} != "${EPREFIX}"* ]]; then

I think you want an additional slash in the second condition, in order
to prevent /foo/barbaz from matching if EPREFIX is equal to /foo/bar:

if [[ ${target:0:1} == "/" && ${target}/ != "${EPREFIX}"/* ]]; then

> +     target="${EPREFIX}${target}"
> +fi
>  ln -snf "${target}" "${ED}${2}"
>  
>  ret=$?

Ulrich

Attachment: pgpkQoluwZQnU.pgp
Description: PGP signature

Reply via email to