mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
Remove -f option from ln for POSIX compliance
Fixes FS#24893. Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
f5dc5c46e0
commit
51ed7dff0d
@ -518,7 +518,8 @@ download_sources() {
|
||||
local file=$(get_filepath "$netfile" || true)
|
||||
if [[ -n "$file" ]]; then
|
||||
msg2 "$(gettext "Found %s")" "${file##*/}"
|
||||
ln -sf "$file" "$srcdir/"
|
||||
rm -f "$srcdir/$file"
|
||||
ln -s "$file" "$srcdir/"
|
||||
continue
|
||||
fi
|
||||
|
||||
@ -878,8 +879,8 @@ tidy_install() {
|
||||
# update symlinks to this manpage
|
||||
find ${MAN_DIRS[@]} -lname "$file" 2>/dev/null |
|
||||
while read link ; do
|
||||
rm -f "$link"
|
||||
ln -sf "${file}.gz" "${link}.gz"
|
||||
rm -f "$link" "${link}.gz"
|
||||
ln -s "${file}.gz" "${link}.gz"
|
||||
done
|
||||
|
||||
# check file still exists (potentially already compressed due to hardlink)
|
||||
@ -1187,9 +1188,13 @@ create_package() {
|
||||
create_signature "$pkg_file"
|
||||
|
||||
if (( ! ret )) && [[ ! "$PKGDEST" -ef "${startdir}" ]]; then
|
||||
ln -sf "${pkg_file}" "${pkg_file/$PKGDEST/$startdir}"
|
||||
rm -f "${pkg_file/$PKGDEST/$startdir}"
|
||||
ln -s "${pkg_file}" "${pkg_file/$PKGDEST/$startdir}"
|
||||
ret=$?
|
||||
[[ -f $pkg_file.sig ]] && ln -sf "$pkg_file.sig" "${pkg_file/$PKGDEST/$startdir}.sig"
|
||||
if [[ -f $pkg_file.sig ]]; then
|
||||
rm -f "${pkg_file/$PKGDEST/$startdir}.sig"
|
||||
ln -s "$pkg_file.sig" "${pkg_file/$PKGDEST/$startdir}.sig"
|
||||
fi
|
||||
fi
|
||||
|
||||
if (( ret )); then
|
||||
@ -1276,7 +1281,8 @@ create_srcpackage() {
|
||||
fi
|
||||
|
||||
if (( ! ret )) && [[ ! "$SRCPKGDEST" -ef "${startdir}" ]]; then
|
||||
ln -sf "${pkg_file}" "${pkg_file/$SRCPKGDEST/$startdir}"
|
||||
rm -f "${pkg_file/$SRCPKGDEST/$startdir}"
|
||||
ln -s "${pkg_file}" "${pkg_file/$SRCPKGDEST/$startdir}"
|
||||
ret=$?
|
||||
fi
|
||||
|
||||
|
@ -613,12 +613,14 @@ if (( success )); then
|
||||
[[ -f $tmpdir/$filename.sig ]] && mv "$tmpdir/$filename.sig" "$REPO_DB_FILE.sig"
|
||||
dblink="${REPO_DB_FILE%.tar*}"
|
||||
target=${REPO_DB_FILE##*/}
|
||||
ln -sf "$target" "$dblink" 2>/dev/null || \
|
||||
ln -f "$target" "$dblink" 2>/dev/null || \
|
||||
rm -f "$dblink"
|
||||
ln -s "$target" "$dblink" 2>/dev/null || \
|
||||
ln "$target" "$dblink" 2>/dev/null || \
|
||||
cp "$REPO_DB_FILE" "$dblink"
|
||||
if [[ -f "$target.sig" ]]; then
|
||||
ln -sf "$target.sig" "$dblink.sig" 2>/dev/null || \
|
||||
ln -f "$target.sig" "$dblink.sig" 2>/dev/null || \
|
||||
rm -f "$dblink.sig"
|
||||
ln -s "$target.sig" "$dblink.sig" 2>/dev/null || \
|
||||
ln "$target.sig" "$dblink.sig" 2>/dev/null || \
|
||||
cp "$REPO_DB_FILE.sig" "$dblink.sig"
|
||||
fi
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user