meta-openembedded and poky: subtree updates

Squash of the following due to dependencies among them
and OpenBMC changes:

meta-openembedded: subtree update:d0748372d2..9201611135
meta-openembedded: subtree update:9201611135..17fd382f34
poky: subtree update:9052e5b32a..2e11d97b6c
poky: subtree update:2e11d97b6c..a8544811d7

The change log was too large for the jenkins plugin
to handle therefore it has been removed. Here is
the first and last commit of each subtree:

meta-openembedded:d0748372d2
      cppzmq: bump to version 4.6.0
meta-openembedded:17fd382f34
      mpv: Remove X11 dependency
poky:9052e5b32a
      package_ipk: Remove pointless comment to trigger rebuild
poky:a8544811d7
      pbzip2: Fix license warning

Change-Id: If0fc6c37629642ee207a4ca2f7aa501a2c673cd6
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/poky/bitbake/lib/toaster/toastergui/api.py b/poky/bitbake/lib/toaster/toastergui/api.py
index 8b49b3e..b4cdc33 100644
--- a/poky/bitbake/lib/toaster/toastergui/api.py
+++ b/poky/bitbake/lib/toaster/toastergui/api.py
@@ -13,7 +13,6 @@
 import json
 import subprocess
 from collections import Counter
-from shutil import copyfile
 
 from orm.models import Project, ProjectTarget, Build, Layer_Version
 from orm.models import LayerVersionDependency, LayerSource, ProjectLayer
@@ -25,12 +24,10 @@
 
 from django.http import HttpResponse, JsonResponse
 from django.views.generic import View
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.db.models import Q, F
 from django.db import Error
 from toastergui.templatetags.projecttags import filtered_filesizeformat
-from django.utils import timezone
-import pytz
 
 # development/debugging support
 verbose = 2
diff --git a/poky/bitbake/lib/toaster/toastergui/tables.py b/poky/bitbake/lib/toaster/toastergui/tables.py
index b3ea222..528dd32 100644
--- a/poky/bitbake/lib/toaster/toastergui/tables.py
+++ b/poky/bitbake/lib/toaster/toastergui/tables.py
@@ -7,15 +7,10 @@
 #
 
 from toastergui.widgets import ToasterTable
-from orm.models import Recipe, ProjectLayer, Layer_Version, Machine, Project
+from orm.models import Recipe, ProjectLayer, Layer_Version, Project
 from orm.models import CustomImageRecipe, Package, Target, Build, LogMessage, Task
 from orm.models import CustomImagePackage, Package_DependencyManager
-from orm.models import Distro
-from django.db.models import Q, Max, Sum, Count, When, Case, Value, IntegerField
-from django.conf.urls import url
-from django.core.urlresolvers import reverse, resolve
-from django.http import HttpResponse
-from django.views.generic import TemplateView
+from django.db.models import Q, Sum, Count, When, Case, Value, IntegerField
 
 from toastergui.tablefilter import TableFilter
 from toastergui.tablefilter import TableFilterActionToggle
diff --git a/poky/bitbake/lib/toaster/toastergui/templatetags/objects_to_dictionaries_filter.py b/poky/bitbake/lib/toaster/toastergui/templatetags/objects_to_dictionaries_filter.py
index 048d533..e242234 100644
--- a/poky/bitbake/lib/toaster/toastergui/templatetags/objects_to_dictionaries_filter.py
+++ b/poky/bitbake/lib/toaster/toastergui/templatetags/objects_to_dictionaries_filter.py
@@ -3,7 +3,6 @@
 #
 
 from django import template
-import json
 
 register = template.Library()
 
diff --git a/poky/bitbake/lib/toaster/toastergui/templatetags/project_url_tag.py b/poky/bitbake/lib/toaster/toastergui/templatetags/project_url_tag.py
index 71e0925..7b6f15b 100644
--- a/poky/bitbake/lib/toaster/toastergui/templatetags/project_url_tag.py
+++ b/poky/bitbake/lib/toaster/toastergui/templatetags/project_url_tag.py
@@ -3,7 +3,7 @@
 #
 
 from django import template
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 
 register = template.Library()
 
diff --git a/poky/bitbake/lib/toaster/toastergui/templatetags/projecttags.py b/poky/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
index 1dbab3b..c432f59 100644
--- a/poky/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
+++ b/poky/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
@@ -6,7 +6,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 #
 
-from datetime import datetime, timedelta
+from datetime import timedelta
 from os.path import relpath
 import re
 from django import template
@@ -44,7 +44,7 @@
     # it manually here
     return mark_safe(JsonLib.dumps(value, indent=2, default = default, ensure_ascii=False).replace('</', '<\\/'))
 
-@register.assignment_tag
+@register.simple_tag
 def query(qs, **kwargs):
     """ template tag which allows queryset filtering. Usage:
           {% query books author=author as mybooks %}
@@ -83,7 +83,7 @@
 def multiply(value, arg):
     return int(value) * int(arg)
 
-@register.assignment_tag
+@register.simple_tag
 def datecompute(delta, start = timezone.now()):
     return start + timedelta(delta)
 
@@ -212,7 +212,7 @@
     """If package.installed_size not null and not empty return it,
        else return package.size
     """
-    return size if (installed_size == 0) or (installed_size == "") or (installed_size == None) else installed_size
+    return size if (installed_size == 0) or (installed_size == "") or (installed_size is None) else installed_size
 
 @register.filter
 def filtered_packageversion(version, revision):
@@ -228,7 +228,7 @@
         formatted nicely.
     """
     size = package_object.installed_size
-    if size == None or size == '':
+    if size is None or size == '':
         size = package_object.size
 
     return '{:.1%}'.format(float(size)/float(total_size))
diff --git a/poky/bitbake/lib/toaster/toastergui/typeaheads.py b/poky/bitbake/lib/toaster/toastergui/typeaheads.py
index fd750ff..a1e6fe9 100644
--- a/poky/bitbake/lib/toaster/toastergui/typeaheads.py
+++ b/poky/bitbake/lib/toaster/toastergui/typeaheads.py
@@ -10,7 +10,7 @@
 
 from toastergui.widgets import ToasterTypeAhead
 from orm.models import Project
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.core.cache import cache
 
 
diff --git a/poky/bitbake/lib/toaster/toastergui/urls.py b/poky/bitbake/lib/toaster/toastergui/urls.py
index 673d9ae..d2df4e6 100644
--- a/poky/bitbake/lib/toaster/toastergui/urls.py
+++ b/poky/bitbake/lib/toaster/toastergui/urls.py
@@ -6,10 +6,9 @@
 # SPDX-License-Identifier: GPL-2.0-only
 #
 
-from django.conf.urls import include, url
-from django.views.generic import RedirectView, TemplateView
+from django.conf.urls import url
+from django.views.generic import RedirectView
 
-from django.http import HttpResponseBadRequest
 from toastergui import tables
 from toastergui import buildtables
 from toastergui import typeaheads
diff --git a/poky/bitbake/lib/toaster/toastergui/views.py b/poky/bitbake/lib/toaster/toastergui/views.py
index d7acaff..9a5e48e 100644
--- a/poky/bitbake/lib/toaster/toastergui/views.py
+++ b/poky/bitbake/lib/toaster/toastergui/views.py
@@ -19,8 +19,8 @@
 from orm.models import TargetKernelFile, TargetSDKFile, Target_Image_File
 from orm.models import BitbakeVersion, CustomImageRecipe
 
-from django.core.urlresolvers import reverse, resolve
-from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist
+from django.urls import reverse, resolve
+from django.core.exceptions import ObjectDoesNotExist
 from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
 from django.http import HttpResponseNotFound, JsonResponse
 from django.utils import timezone
@@ -51,7 +51,7 @@
     def get_mimetype(self, path):
         guess = mimetypes.guess_type(path, self._strict)
         guessed_type = guess[0]
-        if guessed_type == None:
+        if guessed_type is None:
             guessed_type = 'application/octet-stream'
         return guessed_type
 
@@ -126,7 +126,7 @@
     return {"id": x.pk,
             "name": x.layer.name,
             "tooltip": "%s | %s" % (x.layer.vcs_url,x.get_vcs_reference()),
-            "detail": "(%s" % x.layer.vcs_url + (")" if x.release == None else " | "+x.get_vcs_reference()+")"),
+            "detail": "(%s" % x.layer.vcs_url + (")" if x.release is None else " | "+x.get_vcs_reference()+")"),
             "giturl": x.layer.vcs_url,
             "layerdetailurl" : reverse('layerdetails', args=(prj.id,x.pk)),
             "revision" : x.get_vcs_reference(),
@@ -352,7 +352,7 @@
 # set cookies for parameters. this is usefull in case parameters are set
 # manually from the GET values of the link
 def _set_parameters_values(pagesize, orderby, request):
-    from django.core.urlresolvers import resolve
+    from django.urls import resolve
     current_url = resolve(request.path_info).url_name
     request.session['%s_count' % current_url] = pagesize
     request.session['%s_orderby' % current_url] =orderby
@@ -664,7 +664,6 @@
     _set_parameters_values(pagesize, orderby, request)
     return response
 
-from django.core.serializers.json import DjangoJSONEncoder
 from django.http import HttpResponse
 def xhr_dirinfo(request, build_id, target_id):
     top = request.GET.get('start', '/')
@@ -719,7 +718,7 @@
                 resolved_id = o.sym_target_id
                 resolved_path = o.path
                 if target_packages.count():
-                    while resolved_id != "" and resolved_id != None:
+                    while resolved_id != "" and resolved_id is not None:
                         tf = Target_File.objects.get(pk=resolved_id)
                         resolved_path = tf.path
                         resolved_id = tf.sym_target_id
@@ -731,10 +730,10 @@
                         entry['package_id'] = str(p.id)
                         entry['package'] = p.name
                 # don't use resolved path from above, show immediate link-to
-                if o.sym_target_id != "" and o.sym_target_id != None:
+                if o.sym_target_id != "" and o.sym_target_id is not None:
                     entry['link_to'] = Target_File.objects.get(pk=o.sym_target_id).path
             entry['size'] = filtered_filesizeformat(o.size)
-            if entry['link_to'] != None:
+            if entry['link_to'] is not None:
                 entry['permission'] = node_str[o.inodetype] + o.permission
             else:
                 entry['permission'] = node_str[o.inodetype] + o.permission
@@ -756,7 +755,7 @@
     objects = _get_dir_entries(build_id, target_id, '/')
     packages_sum = Package.objects.filter(id__in=Target_Installed_Package.objects.filter(target_id=target_id).values('package_id')).aggregate(Sum('installed_size'))
     dir_list = None
-    if file_path != None:
+    if file_path is not None:
         """
         Link from the included package detail file list page and is
         requesting opening the dir info to a specific file path.
@@ -1030,15 +1029,15 @@
 
 def _get_package_alias(package):
     alias = package.installed_name
-    if alias != None and alias != '' and alias != package.name:
+    if alias is not None and alias != '' and alias != package.name:
         return alias
     else:
         return ''
 
 def _get_fullpackagespec(package):
     r = package.name
-    version_good = package.version != None and  package.version != ''
-    revision_good = package.revision != None and package.revision != ''
+    version_good = package.version is not None and  package.version != ''
+    revision_good = package.revision is not None and package.revision != ''
     if version_good or revision_good:
         r += '_'
         if version_good:
@@ -1192,7 +1191,7 @@
         return _redirect_parameters( 'package_included_reverse_dependencies', request.GET, mandatory_parameters, build_id = build_id, target_id = target_id, package_id = package_id)
     (filter_string, search_term, ordering_string) = _search_tuple(request, Package_File)
 
-    queryset = Package_Dependency.objects.select_related('depends_on__name', 'depends_on__size').filter(depends_on=package_id, target_id=target_id, dep_type=Package_Dependency.TYPE_TRDEPENDS)
+    queryset = Package_Dependency.objects.select_related('depends_on').filter(depends_on=package_id, target_id=target_id, dep_type=Package_Dependency.TYPE_TRDEPENDS)
     objects = _get_queryset(Package_Dependency, queryset, filter_string, search_term, ordering_string, 'package__name')
 
     package = Package.objects.get(pk=package_id)
@@ -1340,7 +1339,7 @@
 
 import toastermain.settings
 
-from orm.models import Project, ProjectLayer, ProjectTarget, ProjectVariable
+from orm.models import Project, ProjectLayer, ProjectVariable
 from bldcontrol.models import  BuildEnvironment
 
 # we have a set of functions if we're in managed mode, or
@@ -1349,10 +1348,8 @@
 if True:
     from django.contrib.auth.models import User
     from django.contrib.auth import authenticate, login
-    from django.contrib.auth.decorators import login_required
 
-    from orm.models import LayerSource, ToasterSetting, Release, Machine, LayerVersionDependency
-    from bldcontrol.models import BuildRequest
+    from orm.models import LayerSource, ToasterSetting, Release
 
     import traceback
 
@@ -1367,8 +1364,8 @@
 
         template = "newproject.html"
         context = {
-            'email': request.user.email if request.user.is_authenticated() else '',
-            'username': request.user.username if request.user.is_authenticated() else '',
+            'email': request.user.email if request.user.is_authenticated else '',
+            'username': request.user.username if request.user.is_authenticated else '',
             'releases': Release.objects.order_by("description"),
         }
 
@@ -1394,7 +1391,7 @@
                     # set alert for missing fields
                     raise BadParameterException("Fields missing: %s" % ", ".join(missing))
 
-                if not request.user.is_authenticated():
+                if not request.user.is_authenticated:
                     user = authenticate(username = request.POST.get('username', '_anonuser'), password = 'nopass')
                     if user is None:
                         user = User.objects.create_user(username = request.POST.get('username', '_anonuser'), email = request.POST.get('email', ''), password = "nopass")
@@ -1441,8 +1438,8 @@
         project = Project.objects.get(pk=pid)
         template = "newproject_specific.html"
         context = {
-            'email': request.user.email if request.user.is_authenticated() else '',
-            'username': request.user.username if request.user.is_authenticated() else '',
+            'email': request.user.email if request.user.is_authenticated else '',
+            'username': request.user.username if request.user.is_authenticated else '',
             'releases': Release.objects.order_by("description"),
             'projectname': project.name,
             'project_pk': project.pk,
@@ -1472,7 +1469,7 @@
                     # set alert for missing fields
                     raise BadParameterException("Fields missing: %s" % ", ".join(missing))
 
-                if not request.user.is_authenticated():
+                if not request.user.is_authenticated:
                     user = authenticate(username = request.POST.get('username', '_anonuser'), password = 'nopass')
                     if user is None:
                         user = User.objects.create_user(username = request.POST.get('username', '_anonuser'), email = request.POST.get('email', ''), password = "nopass")
diff --git a/poky/bitbake/lib/toaster/toastergui/widgets.py b/poky/bitbake/lib/toaster/toastergui/widgets.py
index 645f458..ceff529 100644
--- a/poky/bitbake/lib/toaster/toastergui/widgets.py
+++ b/poky/bitbake/lib/toaster/toastergui/widgets.py
@@ -22,7 +22,7 @@
 from toastergui.templatetags.projecttags import sectohms, get_tasks
 from toastergui.templatetags.projecttags import json as template_json
 from django.http import JsonResponse
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 
 import types
 import json