server/process: Drop unused import
PATCH 1/11 server/process: Drop unused import
--- lib/bb/server/process.py | 1 - 1 file changed, 1 deletion(-)
lib/bb/server/process.py +0 -1
@@ -20,7 +20,6 @@ import os import sys import time import select -import signal import socket import subprocess import errno
Signature · 1 line
2.32.0
PATCH 2/11 ui/buildinfohelper: Drop unused import
--- lib/bb/ui/buildinfohelper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/ui/buildinfohelper.py +1 -1
@@ -45,7 +45,7 @@ from pprint import pformat import logging from datetime import datetime, timedelta -from django.db import transaction, connection +from django.db import transaction # pylint: disable=invalid-name
Signature · 1 line
2.32.0
PATCH 3/11 cooker: Drop unused loop
In reply to Richard Purdie--- lib/bb/cooker.py | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-)
lib/bb/cooker.py +12 -13
@@ -763,19 +763,18 @@ class BBCooker: taskdata[mc].add_unresolved(localdata[mc], self.recipecaches[mc]) mcdeps |= set(taskdata[mc].get_mcdepends()) new = False - for mc in self.multiconfigs: - for k in mcdeps: - if k in seen: - continue - l = k.split(':') - depmc = l[2] - if depmc not in self.multiconfigs: - bb.fatal("Multiconfig dependency %s depends on nonexistent multiconfig configuration named configuration %s" % (k,depmc)) - else: - logger.debug("Adding providers for multiconfig dependency %s" % l[3]) - taskdata[depmc].add_provider(localdata[depmc], self.recipecaches[depmc], l[3]) - seen.add(k) - new = True + for k in mcdeps: + if k in seen: + continue + l = k.split(':') + depmc = l[2] + if depmc not in self.multiconfigs: + bb.fatal("Multiconfig dependency %s depends on nonexistent multiconfig configuration named configuration %s" % (k,depmc)) + else: + logger.debug("Adding providers for multiconfig dependency %s" % l[3]) + taskdata[depmc].add_provider(localdata[depmc], self.recipecaches[depmc], l[3]) + seen.add(k) + new = True for mc in self.multiconfigs: taskdata[mc].add_unresolved(localdata[mc], self.recipecaches[mc])
Signature · 1 line
2.32.0
PATCH 4/11 msg: Drop unused local variable
In reply to Richard Purdie--- lib/bb/msg.py | 1 - 1 file changed, 1 deletion(-)
lib/bb/msg.py +0 -1
@@ -133,7 +133,6 @@ class LogFilterShowOnce(logging.Filter): self.seen_errors = set() def filter(self, record): - msg = record.msg if record.levelno == bb.msg.BBLogFormatter.WARNONCE: if record.msg in self.seen_warnings: return False
Signature · 1 line
2.32.0
PATCH 5/11 buildinfohelper: Drop unused function
In reply to Richard PurdieThe function has a loop where the variable is never used which I was going to fix but the entire function never seems to be called so remove it entirely.
--- lib/bb/ui/buildinfohelper.py | 21 --------------------- 1 file changed, 21 deletions(-)
lib/bb/ui/buildinfohelper.py +0 -21
@@ -1062,27 +1062,6 @@ class BuildInfoHelper(object): return recipe_info - def _get_path_information(self, task_object): - self._ensure_build() - - assert isinstance(task_object, Task) - build_stats_format = "{tmpdir}/buildstats/{buildname}/{package}/" - build_stats_path = [] - - for t in self.internal_state['targets']: - buildname = self.internal_state['build'].build_name - pe, pv = task_object.recipe.version.split(":",1) - if pe: - package = task_object.recipe.name + "-" + pe + "_" + pv - else: - package = task_object.recipe.name + "-" + pv - - build_stats_path.append(build_stats_format.format(tmpdir=self.tmp_dir, - buildname=buildname, - package=package)) - - return build_stats_path - ################################ ## external available methods to store information
Signature · 1 line
2.32.0
PATCH 6/11 fetch2/crate: Drop unused import
In reply to Richard Purdie--- lib/bb/fetch2/crate.py | 1 - 1 file changed, 1 deletion(-)
lib/bb/fetch2/crate.py +0 -1
@@ -13,7 +13,6 @@ BitBake 'Fetch' implementation for crates.io import hashlib import json import os -import shutil import subprocess import bb from bb.fetch2 import logger, subprocess_setup, UnpackError
Signature · 1 line
2.32.0
PATCH 7/11 siggen: Drop pointless break statement
In reply to Richard Purdie--- lib/bb/siggen.py | 1 - 1 file changed, 1 deletion(-)
lib/bb/siggen.py +0 -1
@@ -40,7 +40,6 @@ def init(d): for sg in siggens: if desired == sg.name: return sg(d) - break else: logger.error("Invalid signature generator '%s', using default 'noop'\n" "Available generators: %s", desired,
Signature · 1 line
2.32.0
PATCH 8/11 ui/knotty: Drop pointless pass statement
In reply to Richard Purdie--- lib/bb/ui/knotty.py | 1 - 1 file changed, 1 deletion(-)
lib/bb/ui/knotty.py +0 -1
@@ -877,7 +877,6 @@ def main(server, eventHandler, params, tf = TerminalFilter): state_force_shutdown() main.shutdown = main.shutdown + 1 - pass except Exception as e: import traceback sys.stderr.write(traceback.format_exc())
Signature · 1 line
2.32.0
PATCH 9/11 persist_data: Use a valid exception for missing implementation
In reply to Richard Purdie--- lib/bb/persist_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/persist_data.py +1 -1
@@ -208,7 +208,7 @@ class SQLTable(collections.abc.MutableMapping): def __lt__(self, other): if not isinstance(other, Mapping): - raise NotImplemented + raise NotImplementedError() return len(self) < len(other)
Signature · 1 line
2.32.0
PATCH 10/11 runqueue: Drop pointless variable assignment
In reply to Richard PurdieThis is set at the start of the loop anyway so it does nothing. Drop the pointless code.
--- lib/bb/runqueue.py | 1 - 1 file changed, 1 deletion(-)
lib/bb/runqueue.py +0 -1
@@ -2664,7 +2664,6 @@ def build_scenequeue_data(sqdata, rqdata, rq, cooker, stampcache, sqrq): sq_revdeps_squash[point] = set() if point in rqdata.runq_setscene_tids: sq_revdeps_squash[point] = tasks - tasks = set() continue for dep in rqdata.runtaskentries[point].depends: if point in sq_revdeps[dep]:
Signature · 1 line
2.32.0
PATCH 11/11 buildinfohelper: Drop unused variables
In reply to Richard Purdie--- lib/bb/ui/buildinfohelper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/bb/ui/buildinfohelper.py +2 -2
@@ -496,7 +496,7 @@ class ORMWrapper(object): if not parent_path: parent_path = "/" parent_obj = self._cached_get(Target_File, target = target_obj, path = parent_path, inodetype = Target_File.ITYPE_DIRECTORY) - tf_obj = Target_File.objects.create( + Target_File.objects.create( target = target_obj, path = path, size = size,
@@ -561,7 +561,7 @@ class ORMWrapper(object): parent_obj = Target_File.objects.get(target = target_obj, path = parent_path, inodetype = Target_File.ITYPE_DIRECTORY) - tf_obj = Target_File.objects.create( + Target_File.objects.create( target = target_obj, path = path, size = size,
Signature · 1 line
2.32.0