def get_version_status(<EOL>package_descriptors, targets, repos_data,<EOL>strip_version=False, strip_os_code_name=False):
status = {}<EOL>for package_descriptor in package_descriptors.values():<EOL><INDENT>pkg_name = package_descriptor.pkg_name<EOL>debian_pkg_name = package_descriptor.debian_pkg_name<EOL>ref_version = package_descriptor.version<EOL>if strip_version:<EOL><INDENT>ref_version = _strip_version_suffix(ref_version)<EOL><DEDENT>status[pkg_name] = {}<EOL>for target in targets:<EOL><INDENT>statuses = []<EOL>for repo_data in repos_data:<EOL><INDENT>version = repo_data.get(target, {}).get(debian_pkg_name, None)<EOL>if strip_version:<EOL><INDENT>version = _strip_version_suffix(version)<EOL><DEDENT>if strip_os_code_name:<EOL><INDENT>version = _strip_os_code_name_suffix(<EOL>version, target.os_code_name)<EOL><DEDENT>if ref_version:<EOL><INDENT>if not version:<EOL><INDENT>statuses.append('<STR_LIT>')<EOL><DEDENT>elif version.startswith(ref_version):  <EOL><INDENT>statuses.append('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>if _version_is_gt_other(version, ref_version):<EOL><INDENT>statuses.append('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>statuses.append('<STR_LIT>')<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>if not version:<EOL><INDENT>statuses.append('<STR_LIT:ignore>')<EOL><DEDENT>else:<EOL><INDENT>statuses.append('<STR_LIT>')<EOL><DEDENT><DEDENT><DEDENT>status[pkg_name][target] = statuses<EOL><DEDENT><DEDENT>return status<EOL>
For each package and target check if it is affected by a sync.

This is the case when the package version in the testing repo is different
from the version in the main repo.

:return: a dict indexed by package names containing
  dicts indexed by targets containing
  a list of status strings (one for each repo)