Commit 2a8ed0f When searching by source name try to get a direct match first

1 file Authored and Committed by pingou 7 months ago
When searching by source name try to get a direct match first

Then fall back to what are potentially sub-packages.

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

    
 1 @@ -107,6 +107,12 @@
 2   def get_package_by_src(session, pkg_name):
 3       ''' Return information about a package, if we can find it.
 4       '''
 5 +     # First try if there is a package matching exactly the provided name
 6 +     simple_match = yield from get_package(session, pkg_name)
 7 +     if simple_match and simple_match.basename == pkg_name:
 8 +         return simple_match
 9 + 
10 +     # If there is not a direct match, look by the sourcerpm name
11       output = None
12       cnt = 0
13       try: