def is_system_origin(version, urls): origins = [ppa.get_ppa_origin_name(url) for url in urls] system_version = 0 match = False for origin in version.origins: if origin.origin: if origin.origin not in origins: log.debug("The origin %s is not in %s, so end the loop" % (origin.origin, str(origins))) match = True break if match: system_version = version.version log.debug("Found match url, the system_version is %s, now iter to system version" % system_version) return system_version
def is_full_match_ppa_origin(pkg, version, urls): origins = [ppa.get_ppa_origin_name(url) for url in urls] ppa_version = 0 match = True if version == pkg.installed: for origin in version.origins: if origin.origin: if origin.origin not in origins: log.debug("The origin %s is not in %s, so end the loop" % (origin.origin, str(origins))) match = False break if match: ppa_version = version.version log.debug("Found match url, the ppa_version is %s, now iter to system version" % ppa_version) return ppa_version
def is_system_origin(version, urls): origins = [ppa.get_ppa_origin_name(url) for url in urls] system_version = 0 match = False for origin in version.origins: if origin.origin: if origin.origin not in origins: log.debug( "The origin %s is not in %s, so end the loop" % (origin.origin, str(origins))) match = True break if match: system_version = version.version log.debug( "Found match url, the system_version is %s, now iter to system version" % system_version) return system_version
def is_full_match_ppa_origin(pkg, version, urls): origins = [ppa.get_ppa_origin_name(url) for url in urls] ppa_version = 0 match = True if version == pkg.installed: for origin in version.origins: if origin.origin: if origin.origin not in origins: log.debug( "The origin %s is not in %s, so end the loop" % (origin.origin, str(origins))) match = False break if match: ppa_version = version.version log.debug( "Found match url, the ppa_version is %s, now iter to system version" % ppa_version) return ppa_version