summaryrefslogtreecommitdiffstats
path: root/scripts/contrib/verify-homepage.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-07-23 12:04:23 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-11-16 11:39:36 +0000
commit0821c36fedf3e084c09ec9c6f8897246e4f7897b (patch)
tree1623a73986c5300d4cf76749123ceed6026f9ca2 /scripts/contrib/verify-homepage.py
parent0c489216de4705af17da6fb4274b63148e15ef93 (diff)
downloadpoky-0821c36fedf3e084c09ec9c6f8897246e4f7897b.tar.gz
verify-homepage: fix recipe file selection
* We need to check all recipe files, not just the preferred ones (i.e. we have multiple recipes for different versions of the same piece of software). Print the recipe file name (without path) so we can tell the difference between them. * We can skip BBCLASSEXTENDed variants of recipes (From OE-Core rev: 3e81d209fd8c76fce5bee19acb591483c1335119) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/contrib/verify-homepage.py')
-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__':