Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 84579 Details for
Bug 129852
Run chflags only when needed
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
portage-2.1_pre7-chflags.patch
portage-2.1_pre7-chflags.patch (text/plain), 2.29 KB, created by
Diego Elio Pettenò (RETIRED)
on 2006-04-13 12:05:27 UTC
(
hide
)
Description:
portage-2.1_pre7-chflags.patch
Filename:
MIME Type:
Creator:
Diego Elio Pettenò (RETIRED)
Created:
2006-04-13 12:05:27 UTC
Size:
2.29 KB
patch
obsolete
>Index: portage-2.1_pre7/pym/portage.py >=================================================================== >--- portage-2.1_pre7.orig/pym/portage.py >+++ portage-2.1_pre7/pym/portage.py >@@ -2944,12 +2944,13 @@ def movefile(src,dest,newmtime=None,ssta > if bsd_chflags: > # Check that we can actually unset schg etc flags... > # Clear the flags on source and destination; we'll reinstate them after merging >- if(destexists): >+ if(destexists and sflags != 0): > if bsd_chflags.lchflags(dest, 0) < 0: > writemsg("!!! Couldn't clear flags on file being merged: \n ") > # We might have an immutable flag on the parent dir; save and clear. > pflags=bsd_chflags.lgetflags(os.path.dirname(dest)) >- bsd_chflags.lchflags(os.path.dirname(dest), 0) >+ if pflags != 0: >+ bsd_chflags.lchflags(os.path.dirname(dest), 0) > > # Don't bother checking the return value here; if it fails then the next line will catch it. > bsd_chflags.lchflags(src, 0) >@@ -2985,7 +2986,7 @@ def movefile(src,dest,newmtime=None,ssta > lchown(dest,sstat[stat.ST_UID],sstat[stat.ST_GID]) > if bsd_chflags: > # Restore the flags we saved before moving >- if bsd_chflags.lchflags(dest, sflags) < 0 or bsd_chflags.lchflags(os.path.dirname(dest), pflags) < 0: >+ if ( sflags != 0 and bsd_chflags.lchflags(dest, sflags) < 0 ) or (pflags and bsd_chflags.lchflags(os.path.dirname(dest), pflags) < 0 ): > writemsg("!!! Couldn't restore flags ("+str(flags)+") on " + dest+":\n") > writemsg("!!! %s\n" % str(e)) > return None >@@ -3067,7 +3068,7 @@ def movefile(src,dest,newmtime=None,ssta > > if bsd_chflags: > # Restore the flags we saved before moving >- if bsd_chflags.lchflags(dest, sflags) < 0 or bsd_chflags.lchflags(os.path.dirname(dest), pflags) < 0: >+ if ( sflags != 0 and bsd_chflags.lchflags(dest, sflags) < 0 ) or (pflags and bsd_chflags.lchflags(os.path.dirname(dest), pflags) < 0 ): > writemsg("!!! Couldn't restore flags ("+str(sflags)+") on " + dest+":\n") > return None > >@@ -6204,7 +6205,7 @@ class dblink: > if bsd_chflags: > # Save then clear flags on dest. > dflags=bsd_chflags.lgetflags(mydest) >- if(bsd_chflags.lchflags(mydest, 0)<0): >+ if(dflags != 0 and bsd_chflags.lchflags(mydest, 0)<0): > writemsg("!!! Couldn't clear flags on '"+mydest+"'.\n") > > if not os.access(mydest, os.W_OK):
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 129852
: 84579