Lines 6442-6448
Link Here
|
6442 |
# We need mydest defined up here to calc. protection paths. This is now done once per |
6442 |
# We need mydest defined up here to calc. protection paths. This is now done once per |
6443 |
# directory rather than once per file merge. This should really help merge performance. |
6443 |
# directory rather than once per file merge. This should really help merge performance. |
6444 |
# Trailing / ensures that protects/masks with trailing /'s match. |
6444 |
# Trailing / ensures that protects/masks with trailing /'s match. |
6445 |
mytruncpath="/"+offset+"/" |
6445 |
mytruncpath = os.path.join(destroot, offset) + os.path.sep |
6446 |
myppath=self.isprotected(mytruncpath) |
6446 |
myppath=self.isprotected(mytruncpath) |
6447 |
else: |
6447 |
else: |
6448 |
mergelist=stufftomerge |
6448 |
mergelist=stufftomerge |
Lines 6516-6524
Link Here
|
6516 |
elif self.isprotected(mydest): |
6516 |
elif self.isprotected(mydest): |
6517 |
# Use md5 of the target in ${D} if it exists... |
6517 |
# Use md5 of the target in ${D} if it exists... |
6518 |
if os.path.exists(os.path.normpath(srcroot+myabsto)): |
6518 |
if os.path.exists(os.path.normpath(srcroot+myabsto)): |
6519 |
mydest = new_protect_filename(myrealdest, newmd5=portage_checksum.perform_md5(srcroot+myabsto)) |
6519 |
mydest = new_protect_filename(mydest, |
|
|
6520 |
newmd5=portage_checksum.perform_md5(srcroot+myabsto)) |
6520 |
else: |
6521 |
else: |
6521 |
mydest = new_protect_filename(myrealdest, newmd5=portage_checksum.perform_md5(myabsto)) |
6522 |
mydest = new_protect_filename(mydest, |
|
|
6523 |
newmd5=portage_checksum.perform_md5(myabsto)) |
6522 |
|
6524 |
|
6523 |
# if secondhand is None it means we're operating in "force" mode and should not create a second hand. |
6525 |
# if secondhand is None it means we're operating in "force" mode and should not create a second hand. |
6524 |
if (secondhand!=None) and (not os.path.exists(myrealto)): |
6526 |
if (secondhand!=None) and (not os.path.exists(myrealto)): |
Lines 6649-6657
Link Here
|
6649 |
# only record the last md5 |
6651 |
# only record the last md5 |
6650 |
if len(cfgfiledict[myrealdest])>1: |
6652 |
if len(cfgfiledict[myrealdest])>1: |
6651 |
del cfgfiledict[myrealdest][0] |
6653 |
del cfgfiledict[myrealdest][0] |
6652 |
|
|
|
6653 |
if cfgprot: |
6654 |
if cfgprot: |
6654 |
mydest = new_protect_filename(myrealdest, newmd5=mymd5) |
6655 |
mydest = new_protect_filename(mydest, newmd5=mymd5) |
6655 |
|
6656 |
|
6656 |
# whether config protection or not, we merge the new file the |
6657 |
# whether config protection or not, we merge the new file the |
6657 |
# same way. Unless moveme=0 (blocking directory) |
6658 |
# same way. Unless moveme=0 (blocking directory) |
Lines 6664-6670
Link Here
|
6664 |
mymtime=thismtime |
6665 |
mymtime=thismtime |
6665 |
# We need to touch the destination so that on --update the |
6666 |
# We need to touch the destination so that on --update the |
6666 |
# old package won't yank the file with it. (non-cfgprot related) |
6667 |
# old package won't yank the file with it. (non-cfgprot related) |
6667 |
os.utime(myrealdest,(thismtime,thismtime)) |
6668 |
os.utime(mydest,(thismtime,thismtime)) |
6668 |
zing="---" |
6669 |
zing="---" |
6669 |
if self.settings["USERLAND"] == "Darwin" and myrealdest[-2:] == ".a": |
6670 |
if self.settings["USERLAND"] == "Darwin" and myrealdest[-2:] == ".a": |
6670 |
|
6671 |
|
Lines 6674-6680
Link Here
|
6674 |
# basically internal mtime != file's mtime, so the linker (falsely) thinks |
6675 |
# basically internal mtime != file's mtime, so the linker (falsely) thinks |
6675 |
# the archive is stale, and needs to have it's toc rebuilt. |
6676 |
# the archive is stale, and needs to have it's toc rebuilt. |
6676 |
|
6677 |
|
6677 |
myf=open(myrealdest,"r+") |
6678 |
myf = open(mydest, "r+") |
6678 |
|
6679 |
|
6679 |
# ar mtime field is digits padded with spaces, 12 bytes. |
6680 |
# ar mtime field is digits padded with spaces, 12 bytes. |
6680 |
lms=str(thismtime+5).ljust(12) |
6681 |
lms=str(thismtime+5).ljust(12) |
Lines 6684-6690
Link Here
|
6684 |
# not an archive (dolib.a from portage.py makes it here fex) |
6685 |
# not an archive (dolib.a from portage.py makes it here fex) |
6685 |
myf.close() |
6686 |
myf.close() |
6686 |
else: |
6687 |
else: |
6687 |
st=os.stat(myrealdest) |
6688 |
st = os.stat(mydest) |
6688 |
while myf.tell() < st.st_size - 12: |
6689 |
while myf.tell() < st.st_size - 12: |
6689 |
# skip object name |
6690 |
# skip object name |
6690 |
myf.seek(16,1) |
6691 |
myf.seek(16,1) |
Lines 6704-6711
Link Here
|
6704 |
|
6705 |
|
6705 |
# and now we're at the end. yay. |
6706 |
# and now we're at the end. yay. |
6706 |
myf.close() |
6707 |
myf.close() |
6707 |
mymd5=portage_checksum.perform_md5(myrealdest,calc_prelink=1) |
6708 |
mymd5 = portage_checksum.perform_md5(mydest, calc_prelink=1) |
6708 |
os.utime(myrealdest,(thismtime,thismtime)) |
6709 |
os.utime(mydest,(thismtime,thismtime)) |
6709 |
|
6710 |
|
6710 |
if mymtime!=None: |
6711 |
if mymtime!=None: |
6711 |
zing=">>>" |
6712 |
zing=">>>" |