commit:     ec0954d7a8e66cf07679ac94502b5dfa37a27882
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Apr  8 22:31:52 2015 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Apr 11 15:55:17 2015 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=ec0954d7

repoman: handle removed packages in vcs_files_to_cps (bug 546010)

X-Gentoo-Bug: 546010
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=546010
Acked-by: Alexander Berntsen <bernalex <AT> gentoo.org>

 bin/repoman | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/bin/repoman b/bin/repoman
index 4a21e37..5ff6857 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 exist.
+       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 = \

Reply via email to