diff --git a/openstack_requirements/check.py b/openstack_requirements/check.py index 60d7ada464..9522ce731d 100644 --- a/openstack_requirements/check.py +++ b/openstack_requirements/check.py @@ -105,14 +105,24 @@ def _is_requirement_in_global_reqs(req, global_reqs): if req_exclusions.issubset(global_exclusions): return True else: + difference = global_exclusions - req_exclusions print( "Requirement for package {} " - "has an exclusion not found in the " - "global list: {} vs. {}".format( - req.package, req_exclusions, global_exclusions) + "excludes a version not excluded in the " + "global list.\n" + " Local settings : {}\n" + " Global settings: {}\n" + " Unexpected : {}".format( + req.package, req_exclusions, global_exclusions, + difference) ) return False + print( + "Could not find a global requirements entry to match package {}. " + "If the package is already included in the global list, " + "the name or platform markers there may not match the local settings." + ) return False @@ -151,9 +161,6 @@ def _validate_one(name, reqs, blacklist, global_reqs): counts[''] = counts.get('', 0) + 1 if not _is_requirement_in_global_reqs( req, global_reqs[name]): - print("Requirement for package %s: %s does " - "not match openstack/requirements value : %s" % ( - name, str(req), str(global_reqs[name]))) return True # check for minimum being defined min = [s for s in req.specifiers.split(',') if '>' in s]