Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 472158 Details for
Bug 605082
Add metadata to CONTENTS_ files in vdb
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
use realpath()
integrity-0.2.patch (text/plain), 3.74 KB, created by
Sam
on 2017-05-09 19:56:10 UTC
(
hide
)
Description:
use realpath()
Filename:
MIME Type:
Creator:
Sam
Created:
2017-05-09 19:56:10 UTC
Size:
3.74 KB
patch
obsolete
>--- /usr/lib64/python3.4/site-packages/portage/dbapi/vartree.py 2017-05-09 20:52:52.614757393 +0200 >+++ /usr/lib64/python3.4/site-packages/portage/dbapi/vartree.py 2017-03-01 16:03:59.000000000 +0100 >@@ -4539,17 +4539,6 @@ > mode='w', encoding=_encodings['repo.content'], > errors='backslashreplace') > >- >- # open INTEGRITY file (possibly overwriting old one) for recording >- # Use atomic_ofstream for automatic coercion of raw bytes to >- # unicode, in order to prevent TypeError when writing raw bytes >- # to TextIOWrapper with python2. >- intfile = atomic_ofstream(_unicode_encode( >- os.path.join(self.dbtmpdir, 'INTEGRITY'), >- encoding=_encodings['fs'], errors='strict'), >- mode='w', encoding=_encodings['repo.content'], >- errors='backslashreplace') >- > # Don't bump mtimes on merge since some application require > # preservation of timestamps. This means that the unmerge phase must > # check to see if file belongs to an installed instance in the same >@@ -4562,7 +4551,7 @@ > > # we do a first merge; this will recurse through all files in our srcroot but also build up a > # "second hand" of symlinks to merge later >- if self.mergeme(srcroot, destroot, outfile, intfile, secondhand, >+ if self.mergeme(srcroot, destroot, outfile, secondhand, > self.settings["EPREFIX"].lstrip(os.sep), cfgfiledict, mymtime): > return 1 > >@@ -4574,7 +4563,7 @@ > # couldn't get merged will be added to thirdhand. > > thirdhand = [] >- if self.mergeme(srcroot, destroot, outfile, intfile, thirdhand, >+ if self.mergeme(srcroot, destroot, outfile, thirdhand, > secondhand, cfgfiledict, mymtime): > return 1 > >@@ -4588,7 +4577,7 @@ > > if len(secondhand): > # force merge of remaining symlinks (broken or circular; oh well) >- if self.mergeme(srcroot, destroot, outfile, intfile, None, >+ if self.mergeme(srcroot, destroot, outfile, None, > secondhand, cfgfiledict, mymtime): > return 1 > >@@ -4599,10 +4588,6 @@ > outfile.flush() > outfile.close() > >- #if we opened it, close it >- intfile.flush() >- intfile.close() >- > # write out our collection of md5sums > if cfgfiledict != cfgfiledict_orig: > cfgfiledict.pop("IGNORE", None) >@@ -4614,7 +4599,7 @@ > > return os.EX_OK > >- def mergeme(self, srcroot, destroot, outfile, intfile, secondhand, stufftomerge, cfgfiledict, thismtime): >+ def mergeme(self, srcroot, destroot, outfile, secondhand, stufftomerge, cfgfiledict, thismtime): > """ > > This function handles actual merging of the package contents to the livefs. >@@ -4626,8 +4611,6 @@ > @type destroot: String (Path) > @param outfile: File to log operations to > @type outfile: File Object >- @param intfile: File to log integrity info to >- @type intfile: File Object > @param secondhand: A set of items to merge in pass two (usually > or symlinks that point to non-existing files that may get merged later) > @type secondhand: List >@@ -4766,26 +4749,6 @@ > # confmem rejected this update > zing = "---" > >- srcobj = srcroot+relative_path >- destobj = os.path.realpath(destroot+relative_path) >- hashtype = self.settings["INTEGRITY_HASH"] >- >- line = "" >- if stat.S_ISREG(mymode): >- line = "mode:"+oct(mymode)[-4:]+" " >- if hashtype.lower() == "sha1" or hashtype.lower() == "sha256" or hashtype.lower() == "sha512": >- line += hashtype.lower()+":"+portage.checksum.perform_checksum(srcobj, hashtype.upper(), 0)[0]+" " >- line += "file:"+destobj+"\n" >- elif stat.S_ISDIR(mymode): >- if not os.path.exists(destobj): >- line = "mode:"+oct(mymode)[-4:]+" " >- line += "file:"+destobj+"\n" >- else: #LINK, FIFO, DEV >- line = "mode:"+oct(mymode)[-4:]+" " >- line += "file:"+destobj+"\n" >- >- intfile.write(line) >- > if stat.S_ISLNK(mymode): > # we are merging a symbolic link > # Pass in the symlink target in order to bypass the
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 605082
:
460212
|
472158
|
472168
|
534598
|
534870
|
535372
|
542774
|
543736
|
544732
|
545162
|
545784
|
550998
|
551410