aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-06-02dosfstools: Upgrade 3.0.28 -> 4.0jku/dosfstoolsJussi Kukkonen
* Build system is now autotools * Patches are no longer required * Enable compatibility symlinks Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
2016-06-02image-live, image-vm, wic: Remove fs size workaroundJussi Kukkonen
Since mtools has been patched to live with filesystems with sizes not divisible by sectors-per-track, we no longer need to try to set the size based on our guess of the sectors-per-track dosfstools is going to use. Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
2016-06-02mtools: Patch out a useless sanity checkJussi Kukkonen
The sanity check is ensuring that filesystem size is divisible by sectors-per-track. That seems to be just an optimization for ancient media, and quite tricky to accomplish as different dosfstools versions produce filesystems with different sectors-per-track. Continue processing even if filesystem size is not divisible by sectors-per-track. Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
2016-06-02distro_check.py: Don't mix tabs and spacesJussi Kukkonen
(From OE-Core rev: 6c8d1876f5a2d53fa89531e4a5f414d5d5da77be) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: toaster: use python3 explicitlyEd Bartosh
Explicitly used python3 as default python for oe builds will continue to be python2. [YOCTO #9584] (Bitbake rev: fde5c962cb69a11b072d1f238c2371a5137d030d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: toaster: fix urllib importsEd Bartosh
Some functions have been moved from urllib to urllib.parse in python 3. Modifying the code to import unquote, urlencode and unquote_plus from urllib.parse if import from urllib fails should make it working on both python 2 and python 3. (Bitbake rev: b91aa29fa20befd9841678a727bb91100363518f) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: toaster: don't use mru.count in the templateEd Bartosh
mru is a list. It has a count method, but it differs from the one for the queryset. Using mru.count causes 'Latest project builds' section to silently disappear when toaster runs on python 3. (Bitbake rev: c3ff90c9f028bff5733ebac7b5e72a4688addd3e) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: toaster: use // operator instead of /Ed Bartosh
Division operator works differently in Python 3. It results in float unlike in Python 2, where it results in int. Explicitly used "floor division" operator instead of 'division' operator. This should make the code to result in integer under both pythons. (Bitbake rev: 0c38441ed99b49dae8ef9613e320f0760853d6aa) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: Revert "buildinfohelper: work around unicode exceptions"Ed Bartosh
This commit causes buildinfohelper to crash when run on python 3 as python 3 doesn't have unicode builtin function. This reverts commit 7a309d964a86f3474eaab7df6d438ed797f935c0. (Bitbake rev: 750ca5c8d5a25fc519b75c56352dec7823c7e240) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: xmlrpc: add parameter use_builtin_typesEd Bartosh
Added use_builtin_types parameter to XMLRPCProxyServer.__init__ to fix this error: ERROR: Could not connect to server 0.0.0.0:37132 : __init__() got an unexpected keyword argument 'use_builtin_types' (Bitbake rev: ceb6e5bd33a25c45c2afe1559b9394c466db8a92) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: toaster: use knotty when working with bitbake serverEd Bartosh
Using empty BITBAKE_UI environment variable causes bitbake server to fail with the error: FATAL: Unable to import extension module "" from bb.ui Valid extension modules: knotty or toasterui\n' Used BITBAKE_UI="knotty" when starting and stoping bitbake server to solve above issue. (Bitbake rev: b9a9ddfb6f53259be214032fb93812149d0cce19) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: toaster: fix migrationsEd Bartosh
Created two new migrations due to the models changes made in python3 patchset. (Bitbake rev: 9a6b211b2e15734379186408995851b50a2e0805) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: toaster: moved import bb.server.xmlrpcEd Bartosh
Moved import xmlrpc module to the place where it's used to avoid toaster crashes when importing bitbake code. NOTE: This patch is made to be able to partly test toaster with bitbake from master. It can be removed as soon as bb.server.xmlrpc is ported to python 3. (Bitbake rev: 0c5d691746fb02807568a8a470969a0b68e21915) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: toaster: read timezone files in binary modeEd Bartosh
Used 'rb' mode to open files to avoid unicode error when code runs on python 3: UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 44: invalid start byte [YOCTO #9584] (Bitbake rev: 1414866b84fe1fd674ea79500cd62eda3aa30b33) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: toaster: use re.sub() instead of translate()Ed Bartosh
translate has different set of parameters in python 3 and can't be used the way it's used in toaster api module. Replacing it with re.sub() should make the code work in both python 2 and python 3. [YOCTO #9584] (Bitbake rev: 7cc3a41139abc5b8d1eef4376fb19aba3910ce0d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: toaster: replace map with list comprehensionsEd Bartosh
map returns map object in python 3. Replaced calls of map to equivalent list comprehensions in the code which requires lists. [YOCTO #9584] (Bitbake rev: d41eb6d6c061cb35ec1ecd899f856876f9077167) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: toaster: use items and range instead of old APIsEd Bartosh
Used items() and range() APIs instead of iteritems() and xrange() as latter don't exist in python 3 [YOCTO #9584] (Bitbake rev: 372dd3abcb201bd9ac2c3189c5505d3578ce0dd0) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: toaster: use decode('utf-8') for binary dataEd Bartosh
Decoded binary data to utf-8 to fix the following error when runnign on python 3: TypeError: Type str doesn't support the buffer API [YOCTO #9584] (Bitbake rev: 752ea00919ef054622a51ce097923309934eff2b) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: toaster: modified list of dependenciesEd Bartosh
Removed dependency to argparse and wsgiref as they're in standard python library. wsgiref crashes during installation with python 3 as it's not compatible with python 3. Added dependency to pytz as it's used in the toaster code. (Bitbake rev: 46f185afaaef74c566eec6d8fc1edc68a3b96b32) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: toaster: fix local importsEd Bartosh
Replaced local imports with absolute imports. Used .module for local imports. This should make the code to work on python 2 and python 3. [YOCTO #9584] (Bitbake rev: 3f1e68c783308dcb51242d0fdeef758e581ccc8c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: toaster: fix imports to work for python 3Ed Bartosh
Some APIs have been moved to other modules in python 3: getstatusoutput: moved from commands to subproces urlopen: moved from urllib2 to urllib.request urlparse: moved from urlparse to urllib.parse Made the imports work for both python versions by catching ImportError and importing APIs from different modules. [YOCTO #9584] (Bitbake rev: 1abaa1c6a950b327e6468192dd910549643768bb) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: toaster: get rid of using reduceEd Bartosh
Replaced compicated calls of reduce with more clear code. As reduce was removed from python 3 this change is mandatory for the code to work on both pythons. Here is an example change for illustration purposes: original code: querydict = dict(zip(or_keys, or_values)) query = reduce(operator.or_, map(lambda x: __get_q_for_val(x, querydict[x]), [k for k in querydict]))) replaced with: query = None for key, val in zip(or_keys, or_values): x = __get_q_for_val(k, val) query = query | x if query else x [YOCTO #9584] (Bitbake rev: 249d0bc6094ec9f369a02b78d8ed634a239e5ee4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: toaster: use force_text instead of force_bytesEd Bartosh
Usage of force_bytes in BuildRequest.__str__ method caused python 3 to throw "__str__ returned non-string (type bytes)" error. Replaced force_bytes with force_text to make the code working on both python 2 and python 3. [YOCTO #9584] (Bitbake rev: 9dd9c1393a84d1110c647e84253af8e0bb6acc45) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: goggle/image-writer: Drop since bitrotting and no longer usedRichard Purdie
The upgrade to python3 is the final nail in the coffin for image-writer and the goggle UI. Neither seem used or recieve patches and are based on old versions of GTK+ so drop them, and the remaining crumbs support pieces. (Bitbake rev: ee7df1ca00c76f755057c157c093294efb9078d8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: image-writer/goggle: Disable pygtkcompat problemsRichard Purdie
Disable the problematic gtk usage for use with pygtkcompat. The following commit removes these tools/UIs entirely but we may as well leave this piece in the history in case anyone does want a starting point for reusing them. (Bitbake rev: c53c7418d392452450352ca2175667dbdbd92401) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: lib/bb: Set required python 3 version to 3.4.0Jeremy Puhlman
get_context was added to mutliprocessing as part of 3.4.0 (Bitbake rev: 710351610e3ca4a1b61abc67564f84907e9b2f1c) Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: data_smart: Simplify ExpansionError exceptionRichard Purdie
This seemingly convoluted syntax doesn't work in python3. Instead use the chained exception handling syntax which appears to make more sense here. (Bitbake rev: b19a4c5166303b1fa680582adf63e6a5564bfb4c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: bitbake: Convert to python 3Richard Purdie
Various misc changes to convert bitbake to python3 which don't warrant separation into separate commits. (Bitbake rev: d0f904d407f57998419bd9c305ce53e5eaa36b24) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: bitbake: Drop futures usage since we're python 3Richard Purdie
(Bitbake rev: bf25f05ce4db11466e62f134f9a6916f886a93d9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: bitbake/pyinotify.py: Upgrade to py3 versionRichard Purdie
(Bitbake rev: 5ee80d77bc278758e411048ed09551ab65b9e72d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02bitbake: bitbake/bs4: Upgrade 4.3.2 -> 4.4.1 (python 3 version)Richard Purdie
Upgrade to 4.4.1 which has been run through 2to3 as per the maintainers recommendation for v3 use. (Bitbake rev: 2f4b98af93c971a8c466ffaf3c09cca0edb6e3ad) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02oeqa/selftest/recipetool.py: Tweak matching of warning lineLeonardo Sandoval
We are observing cases (see below) where the 'WARNING:' prefix is not at the beginning of a line, so instead of expecting it in the beginning, match it within the string. ====================================================================== FAIL: test_recipetool_appendfile_patch (oeqa.selftest.recipetool.RecipetoolTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/utils/decorators.py", line 109, in wrapped_f return func(*args, **kwargs) File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/recipetool.py", line 285, in test_recipetool_appendfile_patch self.fail('Patch warning not found in output:\n%s' % output) AssertionError: Patch warning not found in output: Parsing recipes..WARNING: File /etc/selftest-replaceme-patched is added by the patch /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta-selftest/recipes-test/recipetool/files/add-file.patch - you may need to remove or replace this patch in order to replace the file. NOTE: Writing append file /tmp/recipetoolqaug0kdb4x/recipes-test/recipetool/selftest-recipetool-appendfile.bbappend NOTE: Copying /tmp/recipetoolqagci9tita/testfile to /tmp/recipetoolqaug0kdb4x/recipes-test/recipetool/selftest-recipetool-appendfile/testfile done. (From OE-Core rev: 2289138bdaa17b764821f41a3b3fd0a01cda7440) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02qemurunner: Use surrogateescape decodingRichard Purdie
Since the stream can contain invalid binary characters (e.g. from ppc's bootloader) use surrogateescape decoding to ensure we do process the character stream, else it can hang/timeout. (From OE-Core rev: 28a0030430d4cfcaf5dfc3e71bda07cdbfbbf4a7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02devtool.py: Fix parsing of bitbake-layers' outputLeonardo Sandoval
Current parsing was picking wrong targets, leading to the following problem: AssertionError: Command 'bitbake Parsing recipes..done. -e' returned non-zero exit status 1: (From OE-Core rev: eaf83a58825d91c7445835b27d843da7532c208b) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02buildhistory_analysis: Convert stream data (bytes) to stringsLeonardo Sandoval
The bytes type variables are threat different as strings variables in python3, so convert bytes to strings. This was found when using the script buildhistory-diff, where the interpreter was yielding this error TypeError: Type str doesn't support the buffer API (From OE-Core rev: 3064d36186b47954eb94095217f7bb37e3fce651) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02selftest/devtool: Compare sets instead of arrays on AssertEqualLeonardo Sandoval
Sets are safer when comparing internal elements and positions are not important. This commit avoid errors observed on python3 builds as reported on the below bugzilla entry. [YOCTO #9661] (From OE-Core rev: f6df164d09a4d4cf58977bf6cc0bc4f4bc71183a) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02classes/lib: Complete transition to python3Richard Purdie
This patch contains all the other misc pieces of the transition to python3 which didn't make sense to be broken into individual patches. (From OE-Core rev: fcd6b38bab8517d83e1ed48eef1bca9a9a190f57) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02scripts: use python3 in shebangEd Bartosh
As most of oe-test cases work for devtool and recipetool it makes sense to switch both tools to python 3 by explicitly referring to python3 in their shebangs. (From OE-Core rev: dad9617809c60ec5f11d4780b0afa1cffa1efed5) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02scripts: Fix urlparse imports for python3Ed Bartosh
Used urllib.parse instead of urlparse to make code working in python 3. (From OE-Core rev: 0a064f2216895db0181ee033a785328e704ddc0b) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02scripts: Rename ConfigParser -> configparser for python3Ed Bartosh
The ConfigParser API was renamed to configparser in python 3. Renamed ConfigParser -> configparser in scripts/ to make the code working in python 3. (From OE-Core rev: de6e98f272e623ce72e724e66920eecf10cb2d41) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02scripts: Fix encoding errors for python3Ed Bartosh
Moved call of decode('utf-8') as close as possible to call of subprocess API to avoid calling it in a lot of other places. Decoded binary data to utf-8 where appropriate to fix devtool and recipetool tests in python 3 environment. (From OE-Core rev: 30d02e2aa2d42fdf76271234b2dc9f37bc46b250) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02scripts: Replace basestring -> str for python3Ed Bartosh
Python 3 doesn't have basestring type as all string are unicode strings. (From OE-Core rev: e8cfab060f4ff3c4c16387871354d407910e87aa) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02scripts: Fix deprecated dict methods for python3Ed Bartosh
Replaced iteritems -> items, itervalues -> values, iterkeys -> keys or 'in' (From OE-Core rev: 25d4d8274bac696a484f83d7f3ada778cf95f4d0) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02qemurunner: convert data when working with socketEd Bartosh
Converted str to bytes before sending to socket. Converted bytes to str after receiving from socket. This should fix TypeError: 'str' does not support the buffer interface for qemurunner.run_serial method. (From OE-Core rev: 210e290c9251839dc74e3aabdcea3655dd707a50) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02wic: encode help textEd Bartosh
Encoded help text before sending it to pager.communicate as it expects binary. [YOCTO #9412] (From OE-Core rev: 23c27d9d936efaa17da00525f1d2e2f98c53abc7) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02wic: use python3 in shebangEd Bartosh
Switched scripts/wic to use python3 as a default python interpreter. (From OE-Core rev: ea6245d2383e2ba905ef9f1ba210e5dadc779ad8) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02sanity: Switch urlparse to urllib.parseJeremy Puhlman
urlparse is replaced with urllib.parse functionality in python3 (From OE-Core rev: ecfcc5dad20943b762a741546732a6c447265251) Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02classes/lib: Update xrange -> range for python3Richard Purdie
xrange() no longer exists in python 3, use range() (From OE-Core rev: d022b4335100612d6596cc4c4956cb98ed5873cc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02classes/lib: Update to explictly create lists where neededRichard Purdie
Iterators now return views, not lists in python3. Where we need lists, handle this explicitly. (From OE-Core rev: caebd862bac7eed725e0f0321bf50793671b5312) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02classes/lib: Update to match python3 iter requirementsRichard Purdie
python3 standardises its use of iteration operations. Update the code to match the for python3 requires. (From OE-Core rev: 2476bdcbef591e951d11d57d53f1315848758571) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>