summaryrefslogtreecommitdiff
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:36:58 +0000
commit3e81d209fd8c76fce5bee19acb591483c1335119 (patch)
treefdbcd758b1c83da4989b04e46419fa27ee7da464 /scripts/contrib/verify-homepage.py
parent6ee412409ff9331847fbe4e44d1c2a47d2453f18 (diff)
downloadopenembedded-core-3e81d209fd8c76fce5bee19acb591483c1335119.tar.gz
openembedded-core-3e81d209fd8c76fce5bee19acb591483c1335119.tar.bz2
openembedded-core-3e81d209fd8c76fce5bee19acb591483c1335119.zip
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 Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
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):
pkg_pn = bbhandler.cooker.recipecache.pkg_pn
pnlist = sorted(pkg_pn)
count = 0
+ checked = []
for pn in pnlist:
- fn = pkg_pn[pn].pop()
- data = bb.cache.Cache.loadDataFull(fn, bbhandler.cooker.collection.get_file_appends(fn), bbhandler.config_data)
- homepage = data.getVar("HOMEPAGE", True)
- if homepage:
- try:
- urllib2.urlopen(homepage, timeout=5)
- except Exception:
- count = count + wgetHomepage(pn, homepage)
+ for fn in pkg_pn[pn]:
+ # There's no point checking multiple BBCLASSEXTENDed variants of the same recipe
+ realfn, _ = bb.cache.Cache.virtualfn2realfn(fn)
+ if realfn in checked:
+ continue
+ data = bb.cache.Cache.loadDataFull(realfn, bbhandler.cooker.collection.get_file_appends(realfn), bbhandler.config_data)
+ homepage = data.getVar("HOMEPAGE", True)
+ if homepage:
+ try:
+ urllib2.urlopen(homepage, timeout=5)
+ except Exception:
+ count = count + wgetHomepage(os.path.basename(realfn), homepage)
+ checked.append(realfn)
return count
if __name__=='__main__':