summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/process.py2
-rw-r--r--bitbake/lib/bb/server/process.py3
-rw-r--r--bitbake/lib/bb/server/xmlrpcserver.py1
-rw-r--r--bitbake/lib/bb/tests/fetch.py5
-rw-r--r--bitbake/lib/bb/utils.py13
-rw-r--r--bitbake/lib/toaster/orm/fixtures/oe-core.xml12
-rw-r--r--bitbake/lib/toaster/orm/fixtures/poky.xml18
-rw-r--r--bitbake/lib/toaster/orm/fixtures/settings.xml2
-rw-r--r--bitbake/lib/toaster/orm/models.py2
-rw-r--r--bitbake/lib/toaster/toastergui/templates/projectconf.html16
10 files changed, 41 insertions, 33 deletions
diff --git a/bitbake/lib/bb/process.py b/bitbake/lib/bb/process.py
index d5a1775fce..af5d804a1d 100644
--- a/bitbake/lib/bb/process.py
+++ b/bitbake/lib/bb/process.py
@@ -60,7 +60,7 @@ class Popen(subprocess.Popen):
60 "close_fds": True, 60 "close_fds": True,
61 "preexec_fn": subprocess_setup, 61 "preexec_fn": subprocess_setup,
62 "stdout": subprocess.PIPE, 62 "stdout": subprocess.PIPE,
63 "stderr": subprocess.STDOUT, 63 "stderr": subprocess.PIPE,
64 "stdin": subprocess.PIPE, 64 "stdin": subprocess.PIPE,
65 "shell": False, 65 "shell": False,
66 } 66 }
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index fcdce19717..b11c903e08 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -26,6 +26,7 @@ import errno
26import re 26import re
27import datetime 27import datetime
28import pickle 28import pickle
29import gc
29import bb.server.xmlrpcserver 30import bb.server.xmlrpcserver
30from bb import daemonize 31from bb import daemonize
31from multiprocessing import queues 32from multiprocessing import queues
@@ -737,8 +738,10 @@ class ConnectionWriter(object):
737 738
738 def send(self, obj): 739 def send(self, obj):
739 obj = multiprocessing.reduction.ForkingPickler.dumps(obj) 740 obj = multiprocessing.reduction.ForkingPickler.dumps(obj)
741 gc.disable()
740 with self.wlock: 742 with self.wlock:
741 self.writer.send_bytes(obj) 743 self.writer.send_bytes(obj)
744 gc.enable()
742 745
743 def fileno(self): 746 def fileno(self):
744 return self.writer.fileno() 747 return self.writer.fileno()
diff --git a/bitbake/lib/bb/server/xmlrpcserver.py b/bitbake/lib/bb/server/xmlrpcserver.py
index 2fa71be667..01f55538ae 100644
--- a/bitbake/lib/bb/server/xmlrpcserver.py
+++ b/bitbake/lib/bb/server/xmlrpcserver.py
@@ -11,6 +11,7 @@ import hashlib
11import time 11import time
12import inspect 12import inspect
13from xmlrpc.server import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler 13from xmlrpc.server import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler
14import bb.server.xmlrpcclient
14 15
15import bb 16import bb
16 17
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py
index 86eccf7de2..19ea725ac6 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -1059,7 +1059,7 @@ class FetcherNetworkTest(FetcherTest):
1059 """ Prevent regression on deeply nested submodules not being checked out properly, even though they were fetched. """ 1059 """ Prevent regression on deeply nested submodules not being checked out properly, even though they were fetched. """
1060 1060
1061 # This repository also has submodules where the module (name), path and url do not align 1061 # This repository also has submodules where the module (name), path and url do not align
1062 url = "gitsm://github.com/azure/iotedge.git;protocol=https;rev=d76e0316c6f324345d77c48a83ce836d09392699" 1062 url = "gitsm://github.com/azure/iotedge.git;protocol=https;rev=d76e0316c6f324345d77c48a83ce836d09392699;branch=main"
1063 fetcher = bb.fetch.Fetch([url], self.d) 1063 fetcher = bb.fetch.Fetch([url], self.d)
1064 fetcher.download() 1064 fetcher.download()
1065 # Previous cwd has been deleted 1065 # Previous cwd has been deleted
@@ -1358,9 +1358,6 @@ class FetchCheckStatusTest(FetcherTest):
1358 "http://downloads.yoctoproject.org/releases/opkg/opkg-0.1.7.tar.gz", 1358 "http://downloads.yoctoproject.org/releases/opkg/opkg-0.1.7.tar.gz",
1359 "http://downloads.yoctoproject.org/releases/opkg/opkg-0.3.0.tar.gz", 1359 "http://downloads.yoctoproject.org/releases/opkg/opkg-0.3.0.tar.gz",
1360 "ftp://sourceware.org/pub/libffi/libffi-1.20.tar.gz", 1360 "ftp://sourceware.org/pub/libffi/libffi-1.20.tar.gz",
1361 "http://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz",
1362 "https://ftp.gnu.org/gnu/chess/gnuchess-5.08.tar.gz",
1363 "https://ftp.gnu.org/gnu/gmp/gmp-4.0.tar.gz",
1364 # GitHub releases are hosted on Amazon S3, which doesn't support HEAD 1361 # GitHub releases are hosted on Amazon S3, which doesn't support HEAD
1365 "https://github.com/kergoth/tslib/releases/download/1.1/tslib-1.1.tar.xz" 1362 "https://github.com/kergoth/tslib/releases/download/1.1/tslib-1.1.tar.xz"
1366 ] 1363 ]
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index b282d09abf..2a150fe9c7 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -16,7 +16,8 @@ import bb.msg
16import multiprocessing 16import multiprocessing
17import fcntl 17import fcntl
18import importlib 18import importlib
19from importlib import machinery 19import importlib.machinery
20import importlib.util
20import itertools 21import itertools
21import subprocess 22import subprocess
22import glob 23import glob
@@ -451,6 +452,10 @@ def lockfile(name, shared=False, retry=True, block=False):
451 consider the possibility of sending a signal to the process to break 452 consider the possibility of sending a signal to the process to break
452 out - at which point you want block=True rather than retry=True. 453 out - at which point you want block=True rather than retry=True.
453 """ 454 """
455 if len(name) > 255:
456 root, ext = os.path.splitext(name)
457 name = root[:255 - len(ext)] + ext
458
454 dirname = os.path.dirname(name) 459 dirname = os.path.dirname(name)
455 mkdirhier(dirname) 460 mkdirhier(dirname)
456 461
@@ -487,7 +492,7 @@ def lockfile(name, shared=False, retry=True, block=False):
487 return lf 492 return lf
488 lf.close() 493 lf.close()
489 except OSError as e: 494 except OSError as e:
490 if e.errno == errno.EACCES: 495 if e.errno == errno.EACCES or e.errno == errno.ENAMETOOLONG:
491 logger.error("Unable to acquire lock '%s', %s", 496 logger.error("Unable to acquire lock '%s', %s",
492 e.strerror, name) 497 e.strerror, name)
493 sys.exit(1) 498 sys.exit(1)
@@ -1616,7 +1621,9 @@ def load_plugins(logger, plugins, pluginpath):
1616 logger.debug('Loading plugin %s' % name) 1621 logger.debug('Loading plugin %s' % name)
1617 spec = importlib.machinery.PathFinder.find_spec(name, path=[pluginpath] ) 1622 spec = importlib.machinery.PathFinder.find_spec(name, path=[pluginpath] )
1618 if spec: 1623 if spec:
1619 return spec.loader.load_module() 1624 mod = importlib.util.module_from_spec(spec)
1625 spec.loader.exec_module(mod)
1626 return mod
1620 1627
1621 logger.debug('Loading plugins from %s...' % pluginpath) 1628 logger.debug('Loading plugins from %s...' % pluginpath)
1622 1629
diff --git a/bitbake/lib/toaster/orm/fixtures/oe-core.xml b/bitbake/lib/toaster/orm/fixtures/oe-core.xml
index 026d94869a..bb58c6f1bb 100644
--- a/bitbake/lib/toaster/orm/fixtures/oe-core.xml
+++ b/bitbake/lib/toaster/orm/fixtures/oe-core.xml
@@ -23,9 +23,9 @@
23 <field type="CharField" name="branch">master</field> 23 <field type="CharField" name="branch">master</field>
24 </object> 24 </object>
25 <object model="orm.bitbakeversion" pk="4"> 25 <object model="orm.bitbakeversion" pk="4">
26 <field type="CharField" name="name">gatesgarth</field> 26 <field type="CharField" name="name">hardknott</field>
27 <field type="CharField" name="giturl">git://git.openembedded.org/bitbake</field> 27 <field type="CharField" name="giturl">git://git.openembedded.org/bitbake</field>
28 <field type="CharField" name="branch">1.48</field> 28 <field type="CharField" name="branch">1.50</field>
29 </object> 29 </object>
30 30
31 <!-- Releases available --> 31 <!-- Releases available -->
@@ -51,11 +51,11 @@
51 <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href=\"http://cgit.openembedded.org/openembedded-core/log/\"&gt;OpenEmbedded master&lt;/a&gt; branch.</field> 51 <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href=\"http://cgit.openembedded.org/openembedded-core/log/\"&gt;OpenEmbedded master&lt;/a&gt; branch.</field>
52 </object> 52 </object>
53 <object model="orm.release" pk="4"> 53 <object model="orm.release" pk="4">
54 <field type="CharField" name="name">gatesgarth</field> 54 <field type="CharField" name="name">hardknott</field>
55 <field type="CharField" name="description">Openembedded Gatesgarth</field> 55 <field type="CharField" name="description">Openembedded Hardknott</field>
56 <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">4</field> 56 <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">4</field>
57 <field type="CharField" name="branch_name">gatesgarth</field> 57 <field type="CharField" name="branch_name">hardknott</field>
58 <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href=\"http://cgit.openembedded.org/openembedded-core/log/?h=gatesgarth\"&gt;OpenEmbedded Gatesgarth&lt;/a&gt; branch.</field> 58 <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href=\"http://cgit.openembedded.org/openembedded-core/log/?h=hardknott\"&gt;OpenEmbedded Hardknott&lt;/a&gt; branch.</field>
59 </object> 59 </object>
60 60
61 <!-- Default layers for each release --> 61 <!-- Default layers for each release -->
diff --git a/bitbake/lib/toaster/orm/fixtures/poky.xml b/bitbake/lib/toaster/orm/fixtures/poky.xml
index a468a54c49..483d9d8fb4 100644
--- a/bitbake/lib/toaster/orm/fixtures/poky.xml
+++ b/bitbake/lib/toaster/orm/fixtures/poky.xml
@@ -26,9 +26,9 @@
26 <field type="CharField" name="dirpath">bitbake</field> 26 <field type="CharField" name="dirpath">bitbake</field>
27 </object> 27 </object>
28 <object model="orm.bitbakeversion" pk="4"> 28 <object model="orm.bitbakeversion" pk="4">
29 <field type="CharField" name="name">gatesgarth</field> 29 <field type="CharField" name="name">hardknott</field>
30 <field type="CharField" name="giturl">git://git.yoctoproject.org/poky</field> 30 <field type="CharField" name="giturl">git://git.yoctoproject.org/poky</field>
31 <field type="CharField" name="branch">gatesgarth</field> 31 <field type="CharField" name="branch">hardknott</field>
32 <field type="CharField" name="dirpath">bitbake</field> 32 <field type="CharField" name="dirpath">bitbake</field>
33 </object> 33 </object>
34 34
@@ -56,11 +56,11 @@
56 <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/"&gt;Yocto Project Master branch&lt;/a&gt;.</field> 56 <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/"&gt;Yocto Project Master branch&lt;/a&gt;.</field>
57 </object> 57 </object>
58 <object model="orm.release" pk="4"> 58 <object model="orm.release" pk="4">
59 <field type="CharField" name="name">gatesgarth</field> 59 <field type="CharField" name="name">hardknott</field>
60 <field type="CharField" name="description">Yocto Project 3.2 "Gatesgarth"</field> 60 <field type="CharField" name="description">Yocto Project 3.2 "Hardknott"</field>
61 <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">4</field> 61 <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">4</field>
62 <field type="CharField" name="branch_name">gatesgarth</field> 62 <field type="CharField" name="branch_name">hardknott</field>
63 <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=gatesgarth"&gt;Yocto Project Gatesgarth branch&lt;/a&gt;.</field> 63 <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=hardknott"&gt;Yocto Project Hardknott branch&lt;/a&gt;.</field>
64 </object> 64 </object>
65 65
66 <!-- Default project layers for each release --> 66 <!-- Default project layers for each release -->
@@ -152,7 +152,7 @@
152 <field rel="ManyToOneRel" to="orm.layer" name="layer">1</field> 152 <field rel="ManyToOneRel" to="orm.layer" name="layer">1</field>
153 <field type="IntegerField" name="layer_source">0</field> 153 <field type="IntegerField" name="layer_source">0</field>
154 <field rel="ManyToOneRel" to="orm.release" name="release">4</field> 154 <field rel="ManyToOneRel" to="orm.release" name="release">4</field>
155 <field type="CharField" name="branch">gatesgarth</field> 155 <field type="CharField" name="branch">hardknott</field>
156 <field type="CharField" name="dirpath">meta</field> 156 <field type="CharField" name="dirpath">meta</field>
157 </object> 157 </object>
158 158
@@ -190,7 +190,7 @@
190 <field rel="ManyToOneRel" to="orm.layer" name="layer">2</field> 190 <field rel="ManyToOneRel" to="orm.layer" name="layer">2</field>
191 <field type="IntegerField" name="layer_source">0</field> 191 <field type="IntegerField" name="layer_source">0</field>
192 <field rel="ManyToOneRel" to="orm.release" name="release">4</field> 192 <field rel="ManyToOneRel" to="orm.release" name="release">4</field>
193 <field type="CharField" name="branch">gatesgarth</field> 193 <field type="CharField" name="branch">hardknott</field>
194 <field type="CharField" name="dirpath">meta-poky</field> 194 <field type="CharField" name="dirpath">meta-poky</field>
195 </object> 195 </object>
196 196
@@ -228,7 +228,7 @@
228 <field rel="ManyToOneRel" to="orm.layer" name="layer">3</field> 228 <field rel="ManyToOneRel" to="orm.layer" name="layer">3</field>
229 <field type="IntegerField" name="layer_source">0</field> 229 <field type="IntegerField" name="layer_source">0</field>
230 <field rel="ManyToOneRel" to="orm.release" name="release">4</field> 230 <field rel="ManyToOneRel" to="orm.release" name="release">4</field>
231 <field type="CharField" name="branch">gatesgarth</field> 231 <field type="CharField" name="branch">hardknott</field>
232 <field type="CharField" name="dirpath">meta-yocto-bsp</field> 232 <field type="CharField" name="dirpath">meta-yocto-bsp</field>
233 </object> 233 </object>
234</django-objects> 234</django-objects>
diff --git a/bitbake/lib/toaster/orm/fixtures/settings.xml b/bitbake/lib/toaster/orm/fixtures/settings.xml
index 78c0fdca7f..ab3ea021f5 100644
--- a/bitbake/lib/toaster/orm/fixtures/settings.xml
+++ b/bitbake/lib/toaster/orm/fixtures/settings.xml
@@ -19,7 +19,7 @@
19 <field type="CharField" name="value">${TOPDIR}/../sstate-cache</field> 19 <field type="CharField" name="value">${TOPDIR}/../sstate-cache</field>
20 </object> 20 </object>
21 <object model="orm.toastersetting" pk="6"> 21 <object model="orm.toastersetting" pk="6">
22 <field type="CharField" name="name">DEFCONF_IMAGE_INSTALL_append</field> 22 <field type="CharField" name="name">DEFCONF_IMAGE_INSTALL:append</field>
23 <field type="CharField" name="value"></field> 23 <field type="CharField" name="value"></field>
24 </object> 24 </object>
25 <object model="orm.toastersetting" pk="7"> 25 <object model="orm.toastersetting" pk="7">
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 7f7e922ade..f73951e213 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -1717,7 +1717,7 @@ class CustomImageRecipe(Recipe):
1717 1717
1718 def generate_recipe_file_contents(self): 1718 def generate_recipe_file_contents(self):
1719 """Generate the contents for the recipe file.""" 1719 """Generate the contents for the recipe file."""
1720 # If we have no excluded packages we only need to _append 1720 # If we have no excluded packages we only need to :append
1721 if self.excludes_set.count() == 0: 1721 if self.excludes_set.count() == 0:
1722 packages_conf = "IMAGE_INSTALL_append = \" " 1722 packages_conf = "IMAGE_INSTALL_append = \" "
1723 1723
diff --git a/bitbake/lib/toaster/toastergui/templates/projectconf.html b/bitbake/lib/toaster/toastergui/templates/projectconf.html
index bd49f1f585..c74adf0a7e 100644
--- a/bitbake/lib/toaster/toastergui/templates/projectconf.html
+++ b/bitbake/lib/toaster/toastergui/templates/projectconf.html
@@ -73,7 +73,7 @@
73 73
74 {% if image_install_append_defined %} 74 {% if image_install_append_defined %}
75 <dt> 75 <dt>
76 <span class="js-config-var-name js-config-var-managed-name">IMAGE_INSTALL_append</span> 76 <span class="js-config-var-name js-config-var-managed-name">IMAGE_INSTALL:append</span>
77 <span class="glyphicon glyphicon-question-sign get-help" title="Specifies additional packages to install into an image. If your build creates more than one image, the packages will be installed in all of them"></span> 77 <span class="glyphicon glyphicon-question-sign get-help" title="Specifies additional packages to install into an image. If your build creates more than one image, the packages will be installed in all of them"></span>
78 </dt> 78 </dt>
79 <dd class="variable-list"> 79 <dd class="variable-list">
@@ -83,7 +83,7 @@
83 <form id="change-image_install-form" class="form-inline" style="display:none;"> 83 <form id="change-image_install-form" class="form-inline" style="display:none;">
84 <div class="row"> 84 <div class="row">
85 <div class="col-md-4"> 85 <div class="col-md-4">
86 <span class="help-block">To set IMAGE_INSTALL_append to more than one package, type the package names separated by a space.</span> 86 <span class="help-block">To set IMAGE_INSTALL:append to more than one package, type the package names separated by a space.</span>
87 </div> 87 </div>
88 </div> 88 </div>
89 <div class="form-group"> 89 <div class="form-group">
@@ -771,10 +771,10 @@ $(document).ready(function() {
771 771
772 {% if image_install_append_defined %} 772 {% if image_install_append_defined %}
773 773
774 // init IMAGE_INSTALL_append trash icon 774 // init IMAGE_INSTALL:append trash icon
775 setDeleteTooltip($('#delete-image_install-icon')); 775 setDeleteTooltip($('#delete-image_install-icon'));
776 776
777 // change IMAGE_INSTALL_append variable 777 // change IMAGE_INSTALL:append variable
778 $('#change-image_install-icon').click(function() { 778 $('#change-image_install-icon').click(function() {
779 // preset the edit value 779 // preset the edit value
780 var current_val = $("span#image_install").text().trim(); 780 var current_val = $("span#image_install").text().trim();
@@ -814,7 +814,7 @@ $(document).ready(function() {
814 $('#apply-change-image_install').click(function(){ 814 $('#apply-change-image_install').click(function(){
815 // insure these non-empty values have single space prefix 815 // insure these non-empty values have single space prefix
816 var value = " " + $('#new-image_install').val().trim(); 816 var value = " " + $('#new-image_install').val().trim();
817 postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL_append:'+value}); 817 postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL:append:'+value});
818 $('#image_install').text(value); 818 $('#image_install').text(value);
819 $('#image_install').removeClass('text-muted'); 819 $('#image_install').removeClass('text-muted');
820 $("#change-image_install-form").slideUp(function () { 820 $("#change-image_install-form").slideUp(function () {
@@ -826,10 +826,10 @@ $(document).ready(function() {
826 }); 826 });
827 }); 827 });
828 828
829 // delete IMAGE_INSTALL_append variable value 829 // delete IMAGE_INSTALL:append variable value
830 $('#delete-image_install-icon').click(function(){ 830 $('#delete-image_install-icon').click(function(){
831 $(this).tooltip('hide'); 831 $(this).tooltip('hide');
832 postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL_append:'+''}); 832 postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL:append:'+''});
833 $('#image_install').parent().fadeOut(1000, function(){ 833 $('#image_install').parent().fadeOut(1000, function(){
834 $('#image_install').addClass('text-muted'); 834 $('#image_install').addClass('text-muted');
835 $('#image_install').text('Not set'); 835 $('#image_install').text('Not set');
@@ -1011,7 +1011,7 @@ $(document).ready(function() {
1011 $(".save").attr("disabled","disabled"); 1011 $(".save").attr("disabled","disabled");
1012 1012
1013 // Reload page if admin-removed core managed value is manually added back in 1013 // Reload page if admin-removed core managed value is manually added back in
1014 if (0 <= " DISTRO DL_DIR IMAGE_FSTYPES IMAGE_INSTALL_append PACKAGE_CLASSES SSTATE_DIR ".indexOf( " "+variable+" " )) { 1014 if (0 <= " DISTRO DL_DIR IMAGE_FSTYPES IMAGE_INSTALL:append PACKAGE_CLASSES SSTATE_DIR ".indexOf( " "+variable+" " )) {
1015 // delayed reload to avoid race condition with postEditAjaxRequest 1015 // delayed reload to avoid race condition with postEditAjaxRequest
1016 do_reload=true; 1016 do_reload=true;
1017 } 1017 }