>>>>> On Thu, 19 Nov 2020, Ulrich Müller wrote:

> This implements the dosym command proposed for EAPI 8 (called dosym8
> because we cannot use the same name as the package-manager builtin).

> "dosym -r <target> <link>" will expand the (apparent) path of <target>
> relative to the (apparent) path of the directory containing <link>.
> The main aim of this is to allow for an absolute path to be specified
> as the link target, and the function will count path components and
> convert it into a relative path.

> Since we're inside ED at this point but the image will finally be
> installed in EROOT, we don't try to resolve any pre-existing symlinks
> in <target> or <link>. In other words, path expansion only looks at
> the specified apparent paths, without touching any actual files in ED
> or EROOT.

Pushed to master.

Some simple examples to demonstrate usage:

dosym8 -r /bin/foo /usr/bin/foo
- creates a relative symlink named ../../bin/foo

dosym8 -r /usr/share/doc/foo-1 "${TEXMF}"/doc/latex/foo
- creates a relative symlink named ../../../doc/foo-1
  (with TEXMF="/usr/share/texmf-site")

Enjoy!
Ulrich

Attachment: signature.asc
Description: PGP signature

Reply via email to