summaryrefslogtreecommitdiff
path: root/scripts/contrib
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-07-23 11:15:56 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-11-16 11:36:56 +0000
commit6ee412409ff9331847fbe4e44d1c2a47d2453f18 (patch)
tree1248f4dadaf610c2be30175a0851365aeb10946c /scripts/contrib
parent388737270b681439b31f4e1189bdc09d38705f25 (diff)
downloadopenembedded-core-6ee412409ff9331847fbe4e44d1c2a47d2453f18.tar.gz
openembedded-core-6ee412409ff9331847fbe4e44d1c2a47d2453f18.tar.bz2
openembedded-core-6ee412409ff9331847fbe4e44d1c2a47d2453f18.zip
verify-homepage: tidy up output and comments
* Set up and use a proper logger * Tweak output messages and comments Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts/contrib')
-rwxr-xr-xscripts/contrib/verify-homepage.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/scripts/contrib/verify-homepage.py b/scripts/contrib/verify-homepage.py
index 3e7333959c..522824ba58 100755
--- a/scripts/contrib/verify-homepage.py
+++ b/scripts/contrib/verify-homepage.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python
-# This script is used for verify HOMEPAGE.
+# This script can be used to verify HOMEPAGE values for all recipes in
+# the current configuration.
# The result is influenced by network environment, since the timeout of connect url is 5 seconds as default.
import sys
@@ -14,16 +15,19 @@ scripts_path = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/.
lib_path = scripts_path + '/lib'
sys.path = sys.path + [lib_path]
import scriptpath
+import scriptutils
# Allow importing bitbake modules
bitbakepath = scriptpath.add_bitbake_lib_path()
import bb.tinfoil
+logger = scriptutils.logger_create('verify_homepage')
+
def wgetHomepage(pn, homepage):
result = subprocess.call('wget ' + '-q -T 5 -t 1 --spider ' + homepage, shell = True)
if result:
- bb.warn("Failed to verify HOMEPAGE (%s) of %s" % (homepage, pn))
+ logger.warn("%s: failed to verify HOMEPAGE: %s " % (pn, homepage))
return 1
else:
return 0
@@ -44,10 +48,9 @@ def verifyHomepage(bbhandler):
return count
if __name__=='__main__':
- failcount = 0
bbhandler = bb.tinfoil.Tinfoil()
bbhandler.prepare()
- print "Start to verify HOMEPAGE:"
+ logger.info("Start verifying HOMEPAGE:")
failcount = verifyHomepage(bbhandler)
- print "finish to verify HOMEPAGE."
- print "Summary: %s failed" % failcount
+ logger.info("Finished verifying HOMEPAGE.")
+ logger.info("Summary: %s failed" % failcount)