From patchwork Fri Jun 19 07:21:33 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Mikanovich X-Patchwork-Id: 5169 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 19 Jun 2026 09:22:54 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-wm1-f56.google.com (mail-wm1-f56.google.com [209.85.128.56]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 65J7MqEl000320 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 19 Jun 2026 09:22:52 +0200 Received: by mail-wm1-f56.google.com with SMTP id 5b1f17b1804b1-490aadb1386sf14044725e9.0 for ; Fri, 19 Jun 2026 00:22:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1781853767; cv=pass; d=google.com; s=arc-20240605; b=MA2rjY+hfPdvuqXVd8o5x0Jg1a5AYaEeZt6bDulxcxTZ2X8yOPchdgAS5t/0tFQ9Ds aACtxSF5vpjvGgMuQiOirJtZXUdwNreqBiKKceF4sfBo7XE8pBYWaO397LkUpf2MT5/o dkx0XBubE0cDX1Zg2t85NYtCX6fhJdMcQA2FDJ8mPAA0jaIRXn2yCj2uVeoFTMfQf1pM kGKPyvp68N/OXpW5yqeAtBNAPyD2D3sQFVm2xOVSJUHBnl29w0gsjekki0DP/i1kOMwD zByEFl52ZKp+x74MeHv2wL2C2VrQqdpAeujnOGVFQlOzr3QQqKNKHLCOPoq/4aZWOLSN NDKw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=rZXjDVhXvlm/70Saz9t7/FeiewW8lQiNFTVESYs8CqM=; fh=SSD4rph6H18ATyVasybZO/r3UlrI2yP9nPjEgIGOmOI=; b=fFc7Y9HzBJmEJAP11DeGhvzrSpY3lp6H14tGk9jN1nLD/1crmHg6RguMUUZKu+dn6c Z9ezJ0bJ3Svyt4+jmAsprYhmApWqsFh1s80wmdj9uNCiNoRGzxq6y8SFFfPWxU3mprYx 1PLx4+g4o9SUZ6Q7HXXjNxSUlvpjZA0OOskOPcBjKViX4HiVSd49o/iHHmzaEHkur89H LPn5HK7ejH0XyEZQTehyyzEfNm4+mxCuU0zmrFLE2yrPaDqyPdHVsf/owBmpqTRjNAO9 4Mcgrsm1xTFbaLbbGspOBWrc2dgjUDcqgfo/nMHhHA53jFWrSzbL36CsGLv4Ouh2MJHn n+Wg==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20251104; t=1781853767; x=1782458567; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=rZXjDVhXvlm/70Saz9t7/FeiewW8lQiNFTVESYs8CqM=; b=GKLb17JbMyqi5pSPCbv4myzUGZweDb1d+7L+yPq8gWgGDsm1tjBBFM0BRPGygY2eAH HwY0Sq3SdFB+kXecoNvD/cc4taJcuv6qEmH4uc1gfQthbGhzmbQY6IYU+h++XMbEzzwZ iri+3pmGMgyItaz8abX6bexZVny+RIlpeLkvH5Vkk08E7izBXjQB5yBvjihTG0tUL3Uj TRUC3XzO5Qqu6T30rFThs4si7Qy3qq5L+UfaGwjUgvj0DTH7sm44lk/pjFBM8VdsDv5M YpDXMRj8W8Oi4f8jRXzI33nSA75IFMzqSl76XWgrjl5+Rtp/35NXbHvvoNy+Lt783iZw CwlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781853767; x=1782458567; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=rZXjDVhXvlm/70Saz9t7/FeiewW8lQiNFTVESYs8CqM=; b=sy/ZvTdTwvbz11qzoaUGeVZk84w9rVIIPIgZOEB3nks8TP8VwoNBKwwRypwuHBq21o aAjSVsD4NjqmksdTiKcWTxme57+mep/c+WrHcsscnhR6vV4LsozVRK6XF7TMcF+OjR0s hu87TNv/m2B8LmpUFguB0Nq21nhNgY4uMBfVz7BmKc79TXR7+gmSP4YbcZwBEYYfPNl4 W6/7jc/0Aj7luou9lULokRCYoBeJEiRGj0pNTGdooFQAdMXkgxEfehEa7TTX+h7UkyEg QcenPZk5X9fzcTQ1TPPlWyIi8b4xXLK3ljwHj7UmPMQtVKGLe2fb0270AazGOKlAFDuo JHZA== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AFNElJ/AbZPN/lqEeyrq/jUGGhOqTGfc0l92sm/aOFrnNBwnCt6ZrnmbFHPJtKHa/DRoqNV/M9FfQhg=@isar-build.org X-Gm-Message-State: AOJu0YwzpX5C1D5pxH0KAJ6yGi9UdOt8JRFDIeyuMkqplDZLKtdvajps KUKVraZ6rMdUDnzitP5sK/BV7GJheg4r3E9Gr0bBY2xGFlsZuz3VGm2W X-Received: by 2002:a05:600c:3b17:b0:490:bbc1:c9be with SMTP id 5b1f17b1804b1-4924089a2aamr28316335e9.0.1781853767233; Fri, 19 Jun 2026 00:22:47 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="AX0PUUd+MJNDrNGbe5OEfRu7gRxQB+nD+Vl11O0NcHiKcn7DtQ==" Received: by 2002:a05:600c:440f:b0:490:59f6:97e7 with SMTP id 5b1f17b1804b1-492335cc7eals9130005e9.1.-pod-prod-00-eu-canary; Fri, 19 Jun 2026 00:22:45 -0700 (PDT) X-Received: by 2002:a05:600c:4fd6:b0:48a:53cb:8604 with SMTP id 5b1f17b1804b1-49240a44a04mr28294365e9.14.1781853765172; Fri, 19 Jun 2026 00:22:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1781853765; cv=none; d=google.com; s=arc-20260327; b=oMrxHgNl/Nk68a5Smu1LQTKq1SWmn7psaP5jrJRJN4W9vRZwN27uGJjGH5r4PM+OgJ gZRRIx/EPY86EhbFTlDeD1pkU4lcrP/YxKVh7aEzYrZR74fV+5Kl2uhYSBD8vE+isR04 v+8htts1LItZmeC15QIrrwHB4Gd/JU3E02pKAioN1bpBhczyJg3d3CDCffSPIgQzfJql 87pHQOQ3Decl0lnD/d7fzs5ZcWUKXDhPeFwrUyo0/0MUAEM5O8u1wvL8fGWVlIDVCpCw 33YdnyZlkPMDG5c526os8ZiJTDcZ7cc9sLKUiB0Uv/L2MdJ57vM95A8M6e2zRI72BA+J uu1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=Wc9qedvjrbs7UOE5hpNadiDpEAQHtCzAeFxrPcEekgs=; fh=/h9QQkzJ8EboVkWg45aWwpaUro6WMavIVd2OhN45RtE=; b=DM6jNZ0DIXbWOIJ+qF1x+b8pmWTmvSI+obJIBexRFkHBWmUeDtmMwpHN9F2Y5Bh7A5 78mLQkX+LuYG2IiI53v1nlBuYvZ4HQA5/xvn59pq6o4huuIQPKzTX2qrPcpOg1vKIRO+ Nuqo982Ieqlgzm1Gh7FUokXgEfQIMu+zVx0KjfTwAtgJV1P9kcSULVJPuPcf7fYDH3uo 8BD6VZomYTOxPu2Uuc02/bl07SDtctCk5Hyr+8KJmqZmUeQKxzJ2qn/14X6+jVotrWdH e++R0Rn/53CYVU7Dz8cicve25lmJp00on5W9UBFIRis0UN01/Hx2i/raqvLaqgpC3sCh tkvw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 5b1f17b1804b1-49240eef692si227045e9.2.2026.06.19.00.22.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 Jun 2026 00:22:45 -0700 (PDT) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from headcrash-nb.m.ilbers.de ([88.130.203.42]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 65J7MewN032697 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 Jun 2026 09:22:44 +0200 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Anton Mikanovich Subject: [PATCH 5/7] meta: Update OE-libs to v5.0.3 Date: Fri, 19 Jun 2026 09:21:33 +0200 Message-ID: <20260619072238.52120-6-amikan@ilbers.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260619072238.52120-1-amikan@ilbers.de> References: <20260619072238.52120-1-amikan@ilbers.de> MIME-Version: 1.0 X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-Original-Sender: amikan@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= OE-core Revision: 236ac1b43308df722a78d3aa20aef065dfae5b2b. Following changes are left because they are still needed in Isar: 9a714f6e patch: Set dummy credentials for git notes 68f299d0 devshell: Use different termination test to avoid warnings Signed-off-by: Anton Mikanovich --- meta/lib/buildstats.py | 4 +- meta/lib/oe/classutils.py | 2 +- meta/lib/oe/data.py | 2 +- meta/lib/oe/gpg_sign.py | 2 +- meta/lib/oe/maketype.py | 2 +- meta/lib/oe/patch.py | 2 +- meta/lib/oe/path.py | 2 +- meta/lib/oe/reproducible.py | 2 +- meta/lib/oe/sstatesig.py | 2 +- meta/lib/oe/terminal.py | 2 +- meta/lib/oe/types.py | 2 +- meta/lib/oe/utils.py | 100 ++++++++++-------------------------- 12 files changed, 39 insertions(+), 85 deletions(-) diff --git a/meta/lib/buildstats.py b/meta/lib/buildstats.py index fe801a28..1ffe6798 100644 --- a/meta/lib/buildstats.py +++ b/meta/lib/buildstats.py @@ -1,5 +1,5 @@ # -# Imported from openembedded-core +# Copyright OpenEmbedded Contributors # # SPDX-License-Identifier: GPL-2.0-only # @@ -212,4 +212,4 @@ class SystemStats: b'\n') self.last_disk_monitor = now retval = True - return retval + return retval \ No newline at end of file diff --git a/meta/lib/oe/classutils.py b/meta/lib/oe/classutils.py index d879191d..ec3f6ad7 100644 --- a/meta/lib/oe/classutils.py +++ b/meta/lib/oe/classutils.py @@ -1,5 +1,5 @@ # -# Imported from openembedded-core +# Copyright OpenEmbedded Contributors # # SPDX-License-Identifier: GPL-2.0-only # diff --git a/meta/lib/oe/data.py b/meta/lib/oe/data.py index b832e9b3..37121cfa 100644 --- a/meta/lib/oe/data.py +++ b/meta/lib/oe/data.py @@ -1,5 +1,5 @@ # -# Imported from openembedded-core +# Copyright OpenEmbedded Contributors # # SPDX-License-Identifier: GPL-2.0-only # diff --git a/meta/lib/oe/gpg_sign.py b/meta/lib/oe/gpg_sign.py index 7a9cec94..ede6186c 100644 --- a/meta/lib/oe/gpg_sign.py +++ b/meta/lib/oe/gpg_sign.py @@ -1,5 +1,5 @@ # -# Imported from openembedded-core +# Copyright OpenEmbedded Contributors # # SPDX-License-Identifier: GPL-2.0-only # diff --git a/meta/lib/oe/maketype.py b/meta/lib/oe/maketype.py index a9a1dd7b..7a83bdf6 100644 --- a/meta/lib/oe/maketype.py +++ b/meta/lib/oe/maketype.py @@ -1,5 +1,5 @@ # -# Imported from openembedded-core +# Copyright OpenEmbedded Contributors # # SPDX-License-Identifier: GPL-2.0-only # diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py index 35734a0d..60a0cc82 100644 --- a/meta/lib/oe/patch.py +++ b/meta/lib/oe/patch.py @@ -1,5 +1,5 @@ # -# Imported from openembedded-core +# Copyright OpenEmbedded Contributors # # SPDX-License-Identifier: GPL-2.0-only # diff --git a/meta/lib/oe/path.py b/meta/lib/oe/path.py index 68dcb595..5d21cdcb 100644 --- a/meta/lib/oe/path.py +++ b/meta/lib/oe/path.py @@ -1,5 +1,5 @@ # -# Imported from openembedded-core +# Copyright OpenEmbedded Contributors # # SPDX-License-Identifier: GPL-2.0-only # diff --git a/meta/lib/oe/reproducible.py b/meta/lib/oe/reproducible.py index 06a4b5fc..448befce 100644 --- a/meta/lib/oe/reproducible.py +++ b/meta/lib/oe/reproducible.py @@ -1,5 +1,5 @@ # -# Imported from openembedded-core +# Copyright OpenEmbedded Contributors # # SPDX-License-Identifier: GPL-2.0-only # diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py index 63202204..a46e5502 100644 --- a/meta/lib/oe/sstatesig.py +++ b/meta/lib/oe/sstatesig.py @@ -1,5 +1,5 @@ # -# Imported from openembedded-core +# Copyright OpenEmbedded Contributors # # SPDX-License-Identifier: GPL-2.0-only # diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py index 2ae7a45a..4412bc14 100644 --- a/meta/lib/oe/terminal.py +++ b/meta/lib/oe/terminal.py @@ -1,5 +1,5 @@ # -# Imported from openembedded-core +# Copyright OpenEmbedded Contributors # # SPDX-License-Identifier: GPL-2.0-only # diff --git a/meta/lib/oe/types.py b/meta/lib/oe/types.py index 4927fbc5..b929afb1 100644 --- a/meta/lib/oe/types.py +++ b/meta/lib/oe/types.py @@ -1,5 +1,5 @@ # -# Imported from openembedded-core +# Copyright OpenEmbedded Contributors # # SPDX-License-Identifier: GPL-2.0-only # diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py index 9455aadb..14a7d07e 100644 --- a/meta/lib/oe/utils.py +++ b/meta/lib/oe/utils.py @@ -1,5 +1,5 @@ # -# Imported from openembedded-core +# Copyright OpenEmbedded Contributors # # SPDX-License-Identifier: GPL-2.0-only # @@ -7,6 +7,7 @@ import subprocess import multiprocessing import traceback +import errno def read_file(filename): try: @@ -258,16 +259,23 @@ def execute_pre_post_process(d, cmds): if cmds is None: return - for cmd in cmds.strip().split(';'): - cmd = cmd.strip() - if cmd != '': - bb.note("Executing %s ..." % cmd) - bb.build.exec_func(cmd, d) + cmds = cmds.replace(";", " ") -# For each item in items, call the function 'target' with item as the first + for cmd in cmds.split(): + bb.note("Executing %s ..." % cmd) + bb.build.exec_func(cmd, d) + +def get_bb_number_threads(d): + return int(d.getVar("BB_NUMBER_THREADS") or os.cpu_count() or 1) + +def multiprocess_launch(target, items, d, extraargs=None): + max_process = get_bb_number_threads(d) + return multiprocess_launch_mp(target, items, max_process, extraargs) + +# For each item in items, call the function 'target' with item as the first # argument, extraargs as the other arguments and handle any exceptions in the # parent thread -def multiprocess_launch(target, items, d, extraargs=None): +def multiprocess_launch_mp(target, items, max_process, extraargs=None): class ProcessLaunch(multiprocessing.Process): def __init__(self, *args, **kwargs): @@ -302,7 +310,6 @@ def multiprocess_launch(target, items, d, extraargs=None): self.update() return self._result - max_process = int(d.getVar("BB_NUMBER_THREADS") or os.cpu_count() or 1) launched = [] errors = [] results = [] @@ -475,70 +482,6 @@ def get_multilib_datastore(variant, d): localdata.setVar("MLPREFIX", "") return localdata -# -# Python 2.7 doesn't have threaded pools (just multiprocessing) -# so implement a version here -# - -from queue import Queue -from threading import Thread - -class ThreadedWorker(Thread): - """Thread executing tasks from a given tasks queue""" - def __init__(self, tasks, worker_init, worker_end, name=None): - Thread.__init__(self, name=name) - self.tasks = tasks - self.daemon = True - - self.worker_init = worker_init - self.worker_end = worker_end - - def run(self): - from queue import Empty - - if self.worker_init is not None: - self.worker_init(self) - - while True: - try: - func, args, kargs = self.tasks.get(block=False) - except Empty: - if self.worker_end is not None: - self.worker_end(self) - break - - try: - func(self, *args, **kargs) - except Exception as e: - # Eat all exceptions - bb.mainlogger.debug("Worker task raised %s" % e, exc_info=e) - finally: - self.tasks.task_done() - -class ThreadedPool: - """Pool of threads consuming tasks from a queue""" - def __init__(self, num_workers, num_tasks, worker_init=None, worker_end=None, name="ThreadedPool-"): - self.tasks = Queue(num_tasks) - self.workers = [] - - for i in range(num_workers): - worker = ThreadedWorker(self.tasks, worker_init, worker_end, name=name + str(i)) - self.workers.append(worker) - - def start(self): - for worker in self.workers: - worker.start() - - def add_task(self, func, *args, **kargs): - """Add a task to the queue""" - self.tasks.put((func, args, kargs)) - - def wait_completion(self): - """Wait for completion of all the tasks in the queue""" - self.tasks.join() - for worker in self.workers: - worker.join() - class ImageQAFailed(Exception): def __init__(self, description, name=None, logfile=None): self.description = description @@ -586,3 +529,14 @@ def directory_size(root, blocksize=4096): total += sum(roundup(getsize(os.path.join(root, name))) for name in files) total += roundup(getsize(root)) return total + +# Update the mtime of a file, skip if permission/read-only issues +def touch(filename): + try: + os.utime(filename, None) + except PermissionError: + pass + except OSError as e: + # Handle read-only file systems gracefully + if e.errno != errno.EROFS: + raise e