From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id AFC2A138202 for ; Tue, 3 Sep 2013 15:51:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E1F3FE0F63; Tue, 3 Sep 2013 15:51:04 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 67603E0F40 for ; Tue, 3 Sep 2013 15:51:04 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6B86033EB31 for ; Tue, 3 Sep 2013 15:51:03 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 757BEE5469 for ; Tue, 3 Sep 2013 15:51:00 +0000 (UTC) From: "André Erdmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" Message-ID: <1378223247.f047cd03d8593462fdf49054d8d8e6e39495538d.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/overlay/pkgdir/distroot/ X-VCS-Repository: proj/R_overlay X-VCS-Files: roverlay/overlay/pkgdir/distroot/distroot.py X-VCS-Directories: roverlay/overlay/pkgdir/distroot/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: f047cd03d8593462fdf49054d8d8e6e39495538d X-VCS-Branch: master Date: Tue, 3 Sep 2013 15:51:00 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 500e4fa3-6ceb-4291-8fa8-74db7d0dcb64 X-Archives-Hash: d13b283339329c3fccbfa5e4cfcf494b commit: f047cd03d8593462fdf49054d8d8e6e39495538d Author: André Erdmann mailerd de> AuthorDate: Tue Sep 3 15:47:27 2013 +0000 Commit: André Erdmann mailerd de> CommitDate: Tue Sep 3 15:47:27 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=f047cd03 distroot: sync_distmap() This method adds files existing in the distroot to the distmap (unless they already have an entry). IOW, this method is a subset of what check_integrity() does. --- roverlay/overlay/pkgdir/distroot/distroot.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/roverlay/overlay/pkgdir/distroot/distroot.py b/roverlay/overlay/pkgdir/distroot/distroot.py index 9412202..ad0e2b6 100644 --- a/roverlay/overlay/pkgdir/distroot/distroot.py +++ b/roverlay/overlay/pkgdir/distroot/distroot.py @@ -346,6 +346,22 @@ class DistrootBase ( object ): return self.distmap.add_entry_for_volatile ( p_info ) # --- end of distmap_update_entry (...) --- + def sync_distmap ( self ): + """Creates dummy entries for files missing in the distmap.""" + if self.distmap is not None: + hash_pool = roverlay.util.hashpool.HashPool ( + ( self.distmap.get_hash_type(), ), self.HASHPOOL_JOB_COUNT, + use_threads=True + ) + + for abspath, relpath in self.iter_distfiles ( False ): + if relpath not in distmap: + hash_pool.add ( relpath, abspath, None ) + + for relpath, hashdict in hash_pool.run_as_completed(): + self.distmap.add_dummy_entry ( relpath, hashdict=hashdict ) + # --- end of sync_distmap (...) --- + def check_integrity ( self ): """Verifies (and regenerates) the distmap: @@ -356,7 +372,6 @@ class DistrootBase ( object ): (c) drop distmap entries whose file do not exist """ if self.distmap is not None: - root = self.get_root() distfiles = set() distmap_hashtype = self.distmap.get_hash_type() checkfile = self.distmap.check_digest_integrity