Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 96534 Details for
Bug 80846
collision-protect does not handle symlinks
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
avoid unnecessary collisions via device and i-node numbers
inode_collision.patch (text/plain), 1.06 KB, created by
Zac Medico
on 2006-09-09 16:19:43 UTC
(
hide
)
Description:
avoid unnecessary collisions via device and i-node numbers
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2006-09-09 16:19:43 UTC
Size:
1.06 KB
patch
obsolete
>Index: pym/portage.py >=================================================================== >--- pym/portage.py (revision 4429) >+++ pym/portage.py (revision 4431) >@@ -5574,6 +5574,7 @@ > self.updateprotect = protect_obj.updateprotect > self.isprotected = protect_obj.isprotected > self.contentscache=[] >+ self._contents_inodes = None > > def lockdb(self): > if self.lock_num == 0: >@@ -5855,11 +5856,25 @@ > (for this or a previous version)""" > destfile = normalize_path( > os.path.join(destroot, filename.lstrip(os.path.sep))) >- if not os.path.exists(destfile): >+ try: >+ mylstat = os.lstat(destfile) >+ except OSError: > return True >+ > pkgfiles = self.getcontents() > if pkgfiles and filename in pkgfiles: > return True >+ if pkgfiles: >+ if self._contents_inodes is None: >+ self._contents_inodes = set() >+ for x in pkgfiles: >+ try: >+ lstat = os.lstat(x) >+ self._contents_inodes.add((lstat.st_dev, lstat.st_ino)) >+ except OSError: >+ pass >+ if (mylstat.st_dev, mylstat.st_ino) in self._contents_inodes: >+ return True > > return False >
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 80846
:
76091
| 96534