Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 122367 Details for
Bug 182346
portage-2.1.3_rc3 removes files when moving from a directory to a symlink to that directory or vice versa
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
use device/inode numbers are used to determine ownership
inodes.patch (text/plain), 1.73 KB, created by
Zac Medico
on 2007-06-17 22:18:30 UTC
(
hide
)
Description:
use device/inode numbers are used to determine ownership
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2007-06-17 22:18:30 UTC
Size:
1.73 KB
patch
obsolete
>Index: pym/portage.py >=================================================================== >--- pym/portage.py (revision 6863) >+++ pym/portage.py (revision 6864) >@@ -7111,9 +7111,9 @@ > others_in_slot.append(dblink(self.cat, catsplit(cur_cpv)[1], > self.vartree.root, self.settings, > vartree=self.vartree)) >- claimed_paths = set() >- for dblnk in others_in_slot: >- claimed_paths.update(dblnk.getcontents()) >+ dest_root = normalize_path(self.vartree.root).rstrip(os.path.sep) + \ >+ os.path.sep >+ dest_root_len = len(dest_root) > > unmerge_orphans = "unmerge-orphans" in self.settings.features > >@@ -7129,12 +7129,6 @@ > obj = normalize_path(objkey) > file_data = pkgfiles[objkey] > file_type = file_data[0] >- if obj in claimed_paths: >- # A new instance of this package claims the file, so don't >- # unmerge it. >- writemsg_stdout("--- !owned %s %s\n" % \ >- (pkgfiles[objkey][0], obj)) >- continue > statobj = None > try: > statobj = os.stat(obj) >@@ -7149,6 +7143,19 @@ > if lstatobj is None: > writemsg_stdout("--- !found %s %s\n" % (file_type, obj)) > continue >+ if obj.startswith(dest_root): >+ relative_path = obj[dest_root_len:] >+ is_owned = False >+ for dblnk in others_in_slot: >+ if dblnk.isowner(relative_path, dest_root): >+ is_owned = True >+ break >+ if is_owned: >+ # A new instance of this package claims the file, so >+ # don't unmerge it. >+ writemsg_stdout("--- !owned %s %s\n" % \ >+ (file_type, obj)) >+ continue > # next line includes a tweak to protect modules from being unmerged, > # but we don't protect modules from being overwritten if they are > # upgraded. We effectively only want one half of the config protection
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 182346
: 122367