summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2016-05-18 08:35:55 -0700
committerBrian Dolbec <dolsen@gentoo.org>2016-05-18 08:35:55 -0700
commitecd20fa451e72e03aacd41c297b47de896043a5f (patch)
tree56b316e62eb6684c6102f65ea617f3678a9e96a1
parentrevdep-rebuild: Update man page to indicate -e option is only in the bash ver... (diff)
downloadgentoolkit-ecd20fa451e72e03aacd41c297b47de896043a5f.tar.gz
gentoolkit-ecd20fa451e72e03aacd41c297b47de896043a5f.tar.bz2
gentoolkit-ecd20fa451e72e03aacd41c297b47de896043a5f.zip
revdep-rebuild, assign.py: Trap an invalid cpv split bug 571782
Added a check for parts not being valid None or empty list from the catpkgsplit(cpv) call. It will now log the warning with the invalid cpv.
-rw-r--r--pym/gentoolkit/revdep_rebuild/assign.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pym/gentoolkit/revdep_rebuild/assign.py b/pym/gentoolkit/revdep_rebuild/assign.py
index 412ed49..8d819d6 100644
--- a/pym/gentoolkit/revdep_rebuild/assign.py
+++ b/pym/gentoolkit/revdep_rebuild/assign.py
@@ -103,6 +103,11 @@ def get_slotted_cps(cpvs, logger):
cps = []
for cpv in cpvs:
parts = catpkgsplit(cpv)
+ if not parts:
+ logger.warn(('\t' + red("Failed to split the following pkg: "
+ "%s, not a valid cat/pkg-ver" %cpv)))
+ continue
+
cp = parts[0] + '/' + parts[1]
try:
slot = portdb.aux_get(cpv, ["SLOT"])