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 6CDB2138200 for ; Thu, 1 Aug 2013 12:44:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 96869E0A63; Thu, 1 Aug 2013 12:44:56 +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 1D6B9E0A63 for ; Thu, 1 Aug 2013 12:44:55 +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 211D233EB05 for ; Thu, 1 Aug 2013 12:44:55 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id B0ECFE5463 for ; Thu, 1 Aug 2013 12:44:53 +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: <1375360246.9b576fa2d1fc1b4b5c202793e8d5c2eafe079304.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/ X-VCS-Repository: proj/R_overlay X-VCS-Files: roverlay/packageinfo.py X-VCS-Directories: roverlay/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: 9b576fa2d1fc1b4b5c202793e8d5c2eafe079304 X-VCS-Branch: master Date: Thu, 1 Aug 2013 12:44:53 +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: 6ff5d161-e256-4f8f-a7db-15c54032a859 X-Archives-Hash: 7af100689b953bdff0f2191c1dcaf85c commit: 9b576fa2d1fc1b4b5c202793e8d5c2eafe079304 Author: André Erdmann mailerd de> AuthorDate: Thu Aug 1 12:30:46 2013 +0000 Commit: André Erdmann mailerd de> CommitDate: Thu Aug 1 12:30:46 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=9b576fa2 roverlay/packageinfo: bind hashdict in __init__() --- roverlay/packageinfo.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/roverlay/packageinfo.py b/roverlay/packageinfo.py index 25e67d9..752f996 100644 --- a/roverlay/packageinfo.py +++ b/roverlay/packageinfo.py @@ -134,6 +134,8 @@ class PackageInfo ( object ): # self.selfdeps is a list of _mandatory_ selfdeps self.selfdeps = None + self.hashdict = dict() + #self.selfdeps_valid = UNDEF #self.overlay_package_ref = None #self._evars = dict() @@ -537,17 +539,18 @@ class PackageInfo ( object ): """ pkgfile = self.get ( "package_file" ) - if hasattr ( self, 'hashdict' ) and self.hashdict: + if self.hashdict: new_hashes = ( frozenset ( hashlist ) - frozenset ( self.hashdict.keys() ) ) - - if new_hashes: - self.hashdict.update ( - roverlay.digest.multihash_file ( pkgfile, new_hashes ) - ) else: - self.hashdict = roverlay.digest.multihash_file ( pkgfile, hashlist ) + new_hashes = hashlist + + + if new_hashes: + self.hashdict.update ( + roverlay.digest.multihash_file ( pkgfile, new_hashes ) + ) return self.hashdict # --- end of make_hashes (...) ---