summaryrefslogtreecommitdiffstats
path: root/scripts/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/contrib')
-rwxr-xr-xscripts/contrib/verify-homepage.py22
1 files changed, 14 insertions, 8 deletions
diff --git a/scripts/contrib/verify-homepage.py b/scripts/contrib/verify-homepage.py
index 522824ba58..265ff65d3c 100755
--- a/scripts/contrib/verify-homepage.py
+++ b/scripts/contrib/verify-homepage.py
@@ -36,15 +36,21 @@ def verifyHomepage(bbhandler):
36 pkg_pn = bbhandler.cooker.recipecache.pkg_pn 36 pkg_pn = bbhandler.cooker.recipecache.pkg_pn
37 pnlist = sorted(pkg_pn) 37 pnlist = sorted(pkg_pn)
38 count = 0 38 count = 0
39 checked = []
39 for pn in pnlist: 40 for pn in pnlist:
40 fn = pkg_pn[pn].pop() 41 for fn in pkg_pn[pn]:
41 data = bb.cache.Cache.loadDataFull(fn, bbhandler.cooker.collection.get_file_appends(fn), bbhandler.config_data) 42 # There's no point checking multiple BBCLASSEXTENDed variants of the same recipe
42 homepage = data.getVar("HOMEPAGE", True) 43 realfn, _ = bb.cache.Cache.virtualfn2realfn(fn)
43 if homepage: 44 if realfn in checked:
44 try: 45 continue
45 urllib2.urlopen(homepage, timeout=5) 46 data = bb.cache.Cache.loadDataFull(realfn, bbhandler.cooker.collection.get_file_appends(realfn), bbhandler.config_data)
46 except Exception: 47 homepage = data.getVar("HOMEPAGE", True)
47 count = count + wgetHomepage(pn, homepage) 48 if homepage:
49 try:
50 urllib2.urlopen(homepage, timeout=5)
51 except Exception:
52 count = count + wgetHomepage(os.path.basename(realfn), homepage)
53 checked.append(realfn)
48 return count 54 return count
49 55
50if __name__=='__main__': 56if __name__=='__main__':