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 88ADF13800E for ; Mon, 23 Jul 2012 19:18:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 95433E05D7; Mon, 23 Jul 2012 19:18:21 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 67D27E05D7 for ; Mon, 23 Jul 2012 19:18:21 +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 D052A1B436F for ; Mon, 23 Jul 2012 19:18:20 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 9836FE5436 for ; Mon, 23 Jul 2012 19:18:19 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1343071089.76fa0298351ead5a7266f746b03cef22ef715383.blueness@gentoo> Subject: [gentoo-commits] proj/elfix:master commit in: scripts/ X-VCS-Repository: proj/elfix X-VCS-Files: scripts/revdep-pax X-VCS-Directories: scripts/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 76fa0298351ead5a7266f746b03cef22ef715383 X-VCS-Branch: master Date: Mon, 23 Jul 2012 19:18:19 +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: 194f58ac-0ee1-4534-9b8a-d1d5db107ca8 X-Archives-Hash: 254dec8a244b9edb63cea36ed4c00dd0 commit: 76fa0298351ead5a7266f746b03cef22ef715383 Author: Anthony G. Basile gentoo org> AuthorDate: Mon Jul 23 19:18:09 2012 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Mon Jul 23 19:18:09 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=76fa0298 scripts/revdep-pax: simplify map reversal using setdefault --- scripts/revdep-pax | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/scripts/revdep-pax b/scripts/revdep-pax index d34acdc..b9fd83b 100755 --- a/scripts/revdep-pax +++ b/scripts/revdep-pax @@ -68,13 +68,10 @@ def get_forward_linkings(): def invert_linkings( forward_linkings ): reverse_linkings = {} - for binary in forward_linkings: - for library in forward_linkings[binary]: - reverse_linkings[library] = [] for binary in forward_linkings: for library in forward_linkings[binary]: - reverse_linkings[library].append(binary) + reverse_linkings.setdefault(library,[]).append(binary) return reverse_linkings