Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 532650 Details for
Bug 626092
sys-apps/portage: support switch for non-hardlink $D to rootfs merge
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
movefile: hardlink before rename
0001-movefile-hardlink-before-rename-bug-626092.patch (text/plain), 1.11 KB, created by
Zac Medico
on 2018-05-22 19:41:31 UTC
(
hide
)
Description:
movefile: hardlink before rename
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2018-05-22 19:41:31 UTC
Size:
1.11 KB
patch
obsolete
>From 05a6f850a9db30bf1bb4d92c866d615dc389e15a Mon Sep 17 00:00:00 2001 >From: Zac Medico <zmedico@gentoo.org> >Date: Tue, 22 May 2018 12:36:59 -0700 >Subject: [PATCH] movefile: hardlink before rename (bug 626092) > >Since rename to a different parent directory confuses the >kernels /proc/*/exe links, hardlink to the new directory >before rename. > >Bug: https://bugs.gentoo.org/626092 >--- > pym/portage/util/movefile.py | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/pym/portage/util/movefile.py b/pym/portage/util/movefile.py >index 5477a669f3..8711707a19 100644 >--- a/pym/portage/util/movefile.py >+++ b/pym/portage/util/movefile.py >@@ -255,7 +255,12 @@ def movefile(src, dest, newmtime=None, sstat=None, mysettings=None, > if selinux_enabled: > selinux.rename(src, dest) > else: >- os.rename(src, dest) >+ head, tail = os.path.split(dest) >+ hardlink_tmp = os.path.join(head, ".%s._portage_merge_.%s" % \ >+ (tail, os.getpid())) >+ os.link(src, hardlink_tmp) >+ os.rename(hardlink_tmp, dest) >+ os.unlink(src) > renamefailed = 0 > except OSError as e: > if e.errno != errno.EXDEV: >-- >2.13.6 >
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 626092
: 532650