binarytree: ignore separatedebug archives

When we use FEATURES=separatedebug, we create .debug.tbz2 files in the
binary tree that portage warns about.  Silence that here.

BUG=chromium:432294
TEST=using emerge doesn't issue "Binary package name is invalid" warnings

Change-Id: I23a60ba8bcfcd46a74547e137351b8c31a228f9d
Reviewed-on: https://chromium-review.googlesource.com/932581
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index 24500b5..9b2b03c 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -579,6 +579,9 @@
 						continue
 					if not myfile.endswith(SUPPORTED_XPAK_EXTENSIONS):
 						continue
+					# Filter out FEATURES=separatedebug archives.
+					if myfile.endswith('.debug.tbz2'):
+						continue
 					mypath = os.path.join(mydir, myfile)
 					full_path = os.path.join(self.pkgdir, mypath)
 					s = os.lstat(full_path)
@@ -674,6 +677,9 @@
 							invalid_name = True
 						else:
 							mypkg = mypkg[:-len(str(build_id))-1]
+					elif myfile.endswith('.debug.tbz2'):
+						# Files generated by FEATURES=separatedebug.
+						continue
 					elif myfile != mypf + ".tbz2":
 						invalid_name = True