Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 37928 Details for
Bug 58848
.a files and incorrect ar mtimes
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
ranlib-hack.patch v2
ranlib-hack.patch (text/plain), 1.80 KB, created by
Brian Harring (RETIRED)
on 2004-08-22 04:04:55 UTC
(
hide
)
Description:
ranlib-hack.patch v2
Filename:
MIME Type:
Creator:
Brian Harring (RETIRED)
Created:
2004-08-22 04:04:55 UTC
Size:
1.80 KB
patch
obsolete
>diff -urN portage-2.0.51_pre20-orig/pym/portage.py portage-2.0.51_pre20/pym/portage.py >--- portage-2.0.51_pre20-orig/pym/portage.py 2004-08-16 20:15:02.000000000 -0500 >+++ portage-2.0.51_pre20/pym/portage.py 2004-08-22 06:02:28.443669600 -0500 >@@ -6644,6 +6644,46 @@ > # old package won't yank the file with it. (non-cfgprot related) > os.utime(myrealdest,(thismtime,thismtime)) > zing="---" >+ #alright, we've fooled w/ mytime. need to update ar toc mtime's. >+ if self.settings["ARCH"] == "macos" and myrealdest[-2:] == ".a": >+ # insert the new mtime into the ar toc. >+ myf=open(myrealdest,"r+") >+ lms=str(thismtime+5).ljust(12) >+ myf.seek(0) >+ magic=myf.read(8) >+ if magic != "!<arch>\n": >+ print "%s: lacks magic header, skipping" % myrealdest >+ myf.close() >+ else: >+ print "updating toc of %s" % myrealdest >+ st=os.stat(myrealdest) >+ print "initial size is",st.st_size >+ while myf.tell() < st.st_size - 12: >+ print "processing",myf.tell() >+ print "file size=",os.stat(myrealdest).st_size >+ # skip object name >+ myf.seek(16,1) >+ >+ # update mtime >+ myf.write(lms) >+ >+ # skip uid/gid/mperm >+ myf.seek(20,1) >+ >+ # read the archive member's size >+ x=long(myf.read(10)) >+ >+ # skip the trailing newlines, and the potential extra byte if it's >+ # not an even size >+ print "pos",myf.tell(),"size=",st.st_size >+ myf.seek(x + 2 + (x % 1),1) >+ >+ print "final position=",myf.tell() >+ # and now we're at the end. yay. >+ myf.close() >+ mymd5=portage_md5.perform_md5(myrealdest) >+ os.utime(myrealdest,(thismtime,thismtime)) >+ > if mymtime!=None: > zing=">>>" > outfile.write("obj "+myrealdest+" "+mymd5+" "+str(mymtime)+"\n")
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 58848
:
37915
|
37928
|
37934