Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 375722 Details for
Bug 508708
app-eselect/eselect-opengl: make updates atomic
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
0004-upgrade-files-atomically.patch
0004-upgrade-files-atomically.patch (text/plain), 1.29 KB, created by
SpanKY
on 2014-04-25 19:32:01 UTC
(
hide
)
Description:
0004-upgrade-files-atomically.patch
Filename:
MIME Type:
Creator:
SpanKY
Created:
2014-04-25 19:32:01 UTC
Size:
1.29 KB
patch
obsolete
>From 1d2540d8f66d344d3adcfa0db626690d43187dbb Mon Sep 17 00:00:00 2001 >From: Mike Frysinger <vapier@gentoo.org> >Date: Fri, 25 Apr 2014 13:39:21 -0400 >Subject: [PATCH 4/4] upgrade files atomically > >--- > opengl.eselect | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > >diff --git a/opengl.eselect b/opengl.eselect >index 1b72c18..0e1e52a 100644 >--- a/opengl.eselect >+++ b/opengl.eselect >@@ -71,13 +71,13 @@ upgrade_file() { > [[ -f ${file} ]] || return > filename=$(basename "${file}") > >- if [[ -f ${filename} || ( -L ${filename} && ! -e ${filename} ) ]] ; then >- rm -f "${filename}" || die -q "Failed to delete ${workdir}/${filename}" >- fi >- >- #echo "DEBUG: ln -s \"${linkfile}\" \"${filename}\"" >+ #echo "DEBUG: ln -sf \"${linkfile}\" \"${filename}\"" > if [[ "x${REMOVE_ONLY}" == "xfalse" ]]; then >- ln -s "${linkfile}" "${filename}" || die -q "Failed to create symlink ${workdir}/${filename}" >+ # Upgrade the file atomically. #508708 >+ ln -sf "${linkfile}" "${filename}~" || die -q "Failed to create symlink ${workdir}/${filename}~" >+ mv -f "${filename}~" "${filename}" || die -q "Failed to update ${workdir}/${filename}" >+ elif [[ -f ${filename} || ( -L ${filename} && ! -e ${filename} ) ]] ; then >+ rm -f "${filename}" || die -q "Failed to delete ${workdir}/${filename}" > fi > } > >-- >1.9.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 508708
:
375716
|
375718
|
375720
| 375722