Lines 4918-4926
Link Here
|
4918 |
sys.exit(123) |
4937 |
sys.exit(123) |
4919 |
|
4938 |
|
4920 |
if pkgfiles: |
4939 |
if pkgfiles: |
4921 |
mykeys=pkgfiles.keys() |
4940 |
#unmerge-speedup: filter pkgfiles to remove obviously non-existing objects. |
4922 |
mykeys.sort() |
4941 |
# Should be useful for unmerging already deleted kernel sources trees, etc. |
4923 |
mykeys.reverse() |
4942 |
myorigkeys=pkgfiles.keys() |
|
|
4943 |
myorigkeys.sort() |
4944 |
mykeys=[] |
4945 |
while len(myorigkeys): |
4946 |
obj=myorigkeys.pop(0) |
4947 |
mykeys[:0]=[obj] |
4948 |
if pkgfiles[obj][0]=="dir" and not os.path.exists(obj): |
4949 |
# non existing dir -> forget his contents |
4950 |
while len(myorigkeys): |
4951 |
nextobj=myorigkeys[0] |
4952 |
if nextobj[:len(obj)+1]==obj+"/": |
4953 |
# this is some contents |
4954 |
del myorigkeys[0] |
4955 |
else: |
4956 |
# end of the contents |
4957 |
break |
4924 |
|
4958 |
|
4925 |
self.updateprotect() |
4959 |
self.updateprotect() |
4926 |
|
4960 |
|
Lines 4929-4937
Link Here
|
4929 |
mysyms=[] |
4963 |
mysyms=[] |
4930 |
modprotect="/lib/modules/" |
4964 |
modprotect="/lib/modules/" |
4931 |
for obj in mykeys: |
4965 |
for obj in mykeys: |
4932 |
obj=os.path.normpath(obj) |
|
|
4933 |
if obj[:2]=="//": |
4934 |
obj=obj[1:] |
4935 |
if not os.path.exists(obj): |
4966 |
if not os.path.exists(obj): |
4936 |
if not os.path.islink(obj): |
4967 |
if not os.path.islink(obj): |
4937 |
#we skip this if we're dealing with a symlink |
4968 |
#we skip this if we're dealing with a symlink |