Skip to content

Commit

Permalink
post_install.sh: create ags symlink relative to Root directory (#503)
Browse files Browse the repository at this point in the history
Creating the ags executable as an absolute symlink to
$DESTDIR/$2/$APP_ID breaks staged installs, where the installed files
are not placed directly into their expected location but are instead
copied into a temporary location (DESTDIR).
Since installed files maintain their relative directory structure and
any embedded file names will not be modified, we can create a relative
symlink instead, which fixes the issue.

It has the added benefit that the link target remains valid, even if the
storage device underlying this program is mounted into a subdirectory of
the root filesystem (e.g. for recovery).

Bug: gentoo/guru#212
  • Loading branch information
antecrescent authored Jul 15, 2024
1 parent 646d5ad commit 8194f0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion post_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mkdir -p $BIN_DIR

BIN_SRC="$PKGDATA_DIR/$APP_ID"
BIN_DEST="$BIN_DIR/ags"
ln -s -f $BIN_SRC $BIN_DEST
ln -s -r -f $BIN_SRC $BIN_DEST

if [[ "$5" == "false" ]]; then
exit 0
Expand Down

0 comments on commit 8194f0c

Please sign in to comment.