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 754CC138A6C for ; Wed, 8 Apr 2015 22:33:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5F0C1E08B8; Wed, 8 Apr 2015 22:33:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DE04FE08AE for ; Wed, 8 Apr 2015 22:33:39 +0000 (UTC) Received: from x51r2.gaikai.org (unknown [100.42.98.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: zmedico) by smtp.gentoo.org (Postfix) with ESMTPSA id E647F3409ED; Wed, 8 Apr 2015 22:33:38 +0000 (UTC) From: Zac Medico To: gentoo-portage-dev@lists.gentoo.org Cc: Zac Medico Subject: [gentoo-portage-dev] [PATCH] repoman: handle removed packages in vcs_files_to_cps (bug 546010) Date: Wed, 8 Apr 2015 15:33:24 -0700 Message-Id: <1428532404-4710-1-git-send-email-zmedico@gentoo.org> X-Mailer: git-send-email 2.3.1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org X-Archives-Salt: 0ab18408-6864-44a0-b18e-5188a924356a X-Archives-Hash: a752d39b8ea45893f12040ab3c459165 Make vcs_files_to_cps exclude packages that have been removed, since calling code assumes that the packages exist. X-Gentoo-Bug: 546010 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=546010 --- bin/repoman | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/repoman b/bin/repoman index 7101a00..7bcb89f 100755 --- a/bin/repoman +++ b/bin/repoman @@ -1047,7 +1047,10 @@ def vcs_files_to_cps(vcs_file_iter): if len(f_split) > 3 and f_split[1] in categories: modified_cps.append("/".join(f_split[1:3])) - return frozenset(modified_cps) + # Exclude packages that have been removed, since calling + # code assumes that the packages exists. + return frozenset(x for x in frozenset(modified_cps) + if os.path.exists(os.path.join(repodir, x))) def git_supports_gpg_sign(): status, cmd_output = \ -- 2.3.1