--- /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