devserver: fix dbtree lookups with newer portage
Older portage versions would return plain strings with the dbapi which
made them safe to pass directly into diff bintrees. Newer portage now
returns pkg_str which are strings with build metadata attached to them.
When doing bintree lookups, that metadata, if present, is used to look
up further results. If it isn't present, it falls back to treating it
like a plain string.
That means if we try to use a result from one bintree to locate data in
another bintree (like we do with bintree and the gmerge_tree bintrees),
the match will fail if the binpkgs don't match exactly. Which they don't
because we've explicitly modified them in the gmerge_tree.
Address this by normalizing all matches from the different trees into
plain strings. This lets the bintree lookup the extra metadata on the
fly when it doesn't exist.
Commit-Ready: Mike Frysinger <firstname.lastname@example.org>
Tested-by: Mike Frysinger <email@example.com>
Reviewed-by: Chirantan Ekbote <firstname.lastname@example.org>
1 file changed