euscan/handlers: we need the file version
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
This commit is contained in:
		@@ -16,7 +16,14 @@ berlios_regex = r"mirror://berlios/([^/]+)/([^/]+)"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def can_handle(pkg, url=None):
 | 
			
		||||
    return url and re.search(berlios_regex, url)
 | 
			
		||||
    if not url:
 | 
			
		||||
        return False
 | 
			
		||||
 | 
			
		||||
    cp, ver, rev = portage.pkgsplit(pkg.cpv)
 | 
			
		||||
    if ver not in url:
 | 
			
		||||
        return False
 | 
			
		||||
 | 
			
		||||
    return re.search(berlios_regex, url)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def scan_url(pkg, url, options):
 | 
			
		||||
 
 | 
			
		||||
@@ -14,8 +14,14 @@ package_name_regex = r"http://(.+).googlecode.com/files/.+"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def can_handle(pkg, url=None):
 | 
			
		||||
    return url and re.match(package_name_regex, url)
 | 
			
		||||
    if not url:
 | 
			
		||||
        return False
 | 
			
		||||
 | 
			
		||||
    cp, ver, rev = portage.pkgsplit(pkg.cpv)
 | 
			
		||||
    if ver not in url:
 | 
			
		||||
        return False
 | 
			
		||||
 | 
			
		||||
    return re.match(package_name_regex, url)
 | 
			
		||||
 | 
			
		||||
def scan_url(pkg, url, options):
 | 
			
		||||
    output.einfo("Using Google Code handler")
 | 
			
		||||
 
 | 
			
		||||
@@ -12,7 +12,14 @@ PRIORITY = 90
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def can_handle(pkg, url=None):
 | 
			
		||||
    return url and "mirror://sourceforge/" in url
 | 
			
		||||
    if not url:
 | 
			
		||||
        return False
 | 
			
		||||
 | 
			
		||||
    cp, ver, rev = portage.pkgsplit(pkg.cpv)
 | 
			
		||||
    if ver not in url:
 | 
			
		||||
        return False
 | 
			
		||||
 | 
			
		||||
    return "mirror://sourceforge/" in url
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def scan_url(pkg, url, options):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user