View | Details | Raw Unified | Return to bug 49544
Collapse All | Expand All

(-)a/scripts/functions (-1 / +11 lines)
Lines 130-139 CanonPath() Link Here
130
	if [ -L "$f1" ]; then
130
	if [ -L "$f1" ]; then
131
		local d
131
		local d
132
		d=$(dirname -- "$f1")
132
		d=$(dirname -- "$f1")
133
		d=$(readlink -vm -- "$d")
133
		# Do not resolve symbolic links for bin catalogs that be merged.
134
		# For more information about usrmerge: https://altlinux.org/Usrmerge.
135
		case "$d" in
136
			/bin|/sbin) ;;
137
			*) d=$(readlink -vm -- "$d") ;;
138
		esac
134
		f2="${d%/}/${f1##*/}"
139
		f2="${d%/}/${f1##*/}"
135
	else
140
	else
136
		f2=$(readlink -vm -- "$f1")
141
		f2=$(readlink -vm -- "$f1")
142
		# Strip /usr for bin catalogs if it was added due to resolving symbolic
143
		# link.
144
		case "$f1" in
145
			/bin/*|/sbin/*) f2="${f2#/usr}";;
146
		esac
137
	fi
147
	fi
138
	[ "$f1" = "$f2" ] || Verbose "CanonPath2: $f1 -> $f2"
148
	[ "$f1" = "$f2" ] || Verbose "CanonPath2: $f1 -> $f2"
139
	echo "$f2"
149
	echo "$f2"

Return to bug 49544