aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/distro_check.py
AgeCommit message (Collapse)Author
2015-11-24lib/oe/distro_check: don't set empty proxy keysRoss Burton
If the proxies dictionary has a proxy set to None urllib will throw an exception instead of not using a proxy (abridged stack): File: '/home/ross/Yocto/poky/meta/lib/oe/distro_check.py', lineno: 43, function: get_links_from_url *** 0043: with create_socket(url,d) as sock: 0044: webpage = sock.read() File: '/home/ross/Yocto/poky/meta/lib/oe/distro_check.py', lineno: 5, function: create_socket 0003:def create_socket(url, d): 0004: import urllib *** 0005: socket = urllib.urlopen(url, proxies=get_proxies(d)) File: '/usr/lib/python2.7/urllib.py', lineno: 87, function: urlopen 0086: if data is None: *** 0087: return opener.open(url) File: '/usr/lib/python2.7/urllib.py', lineno: 203, function: open 0201: else: 0202: proxy = None *** 0203: name = 'open_' + urltype 0204: self.type = urltype 0205: name = name.replace('-', '_') Exception: TypeError: cannot concatenate 'str' and 'NoneType' objects Filter out unset values so that the dictionary only has valid assignments in. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-12lib/oe/distro_check: Remove '_proxy' on dict values used by urllib.openLeonardo Sandoval
There are two ways to pass the proxies values into urllib.open: exporting the environment variables *_proxy and passing as dictionary into the urllib.open call. The latter is currenty used and values should not have the '_proxy' string, so removing it. Also, ignore uppercase proxies, these are not taken into account by the library. Tested on a network with proxy, adding 'inherit +="distrodata"' on local.conf with the following commands for distrotask in distrodataall distro_checkall checklicenseall; do bitbake universe -c $distrotask done [YOCTO #7567] Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-01distrodata: Take account proxies on distrodata tasksLeonardo Sandoval
Proxies defined in the enviroment where not taken into account on the distrodata tasks. This commit implied passing the datastore into the distro_check library and context manager for the urllib.urlopen function. One way to run distrodata tasks is using 'universe' as target and the 'all' distrodata task: $ bitbake universe -c distrodataall $ bitbake universe -c distro_checkall $ bitbake universe -c checklicenseall Logs are located under TMPDIR/log [YOCTO #7567] Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-12distro_check: Remove creation of empty Meego filelist.Anders Roxell
This fixes permissions errors when running distrodata. Signed-off-by: Anders Roxell <anders.roxell@enea.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-10-03distrodata: Update distrocheck functionsSaul Wold
Fix the distro check functions for the change of nativesdk being a suffix to a prefix. Also added crosssdk as another case for converting to PN for matching in the distro_tracking Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30meta: replace os.system with subprocess.callRobert Yang
Replace os.system with subprocess.call since the older function would fail (more or less) silently if the executed program cannot be found More info: http://docs.python.org/library/subprocess.html#subprocess-replacements [YOCTO #2454] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-24distro_check: fix the fedora URL for rleases as they seem to have movedSaul Wold
Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-26getVar/setVar cleanupsRichard Purdie
Complete the bb.data.getVar/setVar replacements with accesses directly to the data store object. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10Convert to use direct access to the data store (instead of bb.data.*Var*())Richard Purdie
This is the result of running the following over the metadata: sed \ -e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \ -e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-21distrodata: fix distro_check codeSaul Wold
This fixes a problem with package names from inherits showing up Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-05-17Add a new task checklicense and fix some bugs in distro_check.pyMei Lei
distro_check.py: Create a new function called create_log_file to reduce a lot of repeat code in distrodata.bbclass. We needn't to create log file in function save_distro_check_result, because the log file has been generated in check_eventhandler. Another bug is that we maybe access the /tmp/Meego-1.0 before we create this file. Add a judge statement to decide whether we need to create this file firstly. distrodata.bbclass: Add a new task checklicense to collect missing text license information. This can help package-report system to know how many recipes are missing license text. Signed-off-by: Mei Lei <lei.mei@intel.com>
2011-05-04distro_check.py: Fix some bugs in distro_check.pyMei Lei
The recipe meta-ide-support's alias is Poky, but not defined in distro_exceptions, this will lead an error. The compare_in_distro_packages_list function omit a split process, this will lead to a form issue. Change the log file generate way, use symbolic links link to the latest log file, instead of appending every log file in old log. Signed-off-by: Mei Lei <lei.mei@intel.com>
2011-04-21lib/oe/distro_check.py: Fixup Poky referencesRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2010-10-15distrodata: Modify Distro tracking spreadsheetSaul Wold
Signed-off-by: Saul Wold <Saul.Wold@intel.com>
2010-09-27distro_check.py: Added additional support for distro checkingSaul Wold
Now tells which section a macth occurs (main vs contrib) Keywords for Poky, OpenedHand, ... Signed-off-by: Saul Wold <Saul.Wold@intel.com>
2010-09-17Distro Tracking: Updated and add Poky Alias infoSaul Wold
distro_check.py: Add DISTRO_PN_ALIAS check for Poky, OpenedHand, Intel and Upstream, to mark packages that are not in known upstreams distro_tracking_fields.inc: Merged private files into 1 master file Added additional Maintainer Info Added Distro Alias information for Poky and OpenedHand Signed-off-by: Saul Wold <Saul.Wold@intel.com>
2010-09-02distro_check: fix for natives, cross, and initial recipe typesSaul Wold
datetime checking is changed to be once per day Signed-off-by: Saul Wold <Saul.Wold@intel.com> distro_check: fix for natives, cross, and initial recipe types Signed-off-by: Saul Wold <Saul.Wold@intel.com>
2010-09-02distro_check: use space as the delimiter for aliasesKevin Tian
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2010-06-02do_distro_check: Recipe exists in other distros?Nitin A Kamble
This adds a new task (distro_check) for each recipe. The task generates the source package list for Fedora OpenSuSE Ubuntu Debian & Mandriva Linux distros. As one recipe or source package can generate multiple target packages the recipe name is compared with the source package name list of LInux distributions. Thread locking is used to avoid multiple threads racing for the package list update. Then the recipe name (PN) is checked if it exists in the package list of distros. And if the DISTRO_PN_ALIAS then it is used to copmare pacakge_name instead of the PN variable. Just for example the DISTRO_PN_ALIAS can be defined in the recipe (.bb) files like this In the file xset_1.0.4.bb: DISTRO_PN_ALIAS = "Fedora=xorg-x11-server-utils;\ Ubuntu=x11-xserver-utils; Debian=x11-xserver-utils;Opensuse=xorg-x11" The final results are stored in the tmp/log/distro_check-${DATETIME}.result file. FYI this command will generate the results for all recipies: bitbake world -f -c distro_check Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>