From patchwork Tue Jul 19 04:35:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmidt, Adriaan" X-Patchwork-Id: 1992 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Tue, 19 Jul 2022 14:35:35 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-ej1-f60.google.com (mail-ej1-f60.google.com [209.85.218.60]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 26JCZZgL014966 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 19 Jul 2022 14:35:35 +0200 Received: by mail-ej1-f60.google.com with SMTP id hr24-20020a1709073f9800b0072b57c28438sf2993506ejc.5 for ; Tue, 19 Jul 2022 05:35:35 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1658234130; cv=pass; d=google.com; s=arc-20160816; b=ddCriQjCbxgJoJNaGKsXh2xox+tZuA5JM3cLrwZkJoLudBMsnzFYE8fVNTdcaK0A4h IEkZSyn/SW8I7FdxLKDoEFt2QTe5rKL1tC5D6/l1pmYl3kdze3YKHYbAsEcQnVGDVVQ2 OYVNYpbbqxnUMXYbzUibszEaLaggzltH5ic/NIFlX7IzrYvfFSntOcsAbz9QCmN9C9gc Y5gihpJQAwc9kTq+cB/JhdP8HPfmLSeaJyEqELyLCPd1dQNPPm8bn6pYZKeEQyg9p2AR tQtanphl12+zGprNLRI4rhyHvzlqOlzdXKSXUiq2HPYMFE9zAedpf1sCCqSlj0KFILqo 0Grg== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=pW8DZPXL0yDnA9IKnS/BIrKEk5x3Vf6FLIpZJ0PvpHc=; b=oM2stVaR4ngE7i35NOdX6iq1s/f8qbRGXR94aaJ/+YhJ2imYYxKXV365Btl/qVy5HK BBT9BvEgh1qpjqb/zBKVBewSjktSq5M+o289lBJgH3GzlVweWk6VYJWSMn0+jsWIO1E4 vdgMafiFS0M1bH1jQI8b/aQ9DUQmYkAhXoEUA6D8tCpozEf5UtM7RCNbEN2v0IbfGabC MsL2C5XOl6KUzfGb080oGTiH713MeHYUcPI+sXIgTBKRhnotl29h0f1jmz3b4qKTWqrx N9PVkgAT7kCjz4T/jJRQ8wqJUPkzg3mXkLYxRW5R95fsCEK0yKzCTpAhBNX4K4ygPXQY n4rQ== ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=sNkf5at5; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of adriaan.schmidt@siemens.com designates 40.107.1.48 as permitted sender) smtp.mailfrom=adriaan.schmidt@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=pW8DZPXL0yDnA9IKnS/BIrKEk5x3Vf6FLIpZJ0PvpHc=; b=fSkc3+aOUK2wy9L+Ph0kb0irrdTpgzPs9YAi9TH1K5Y8GNdaNZaU0mdVcEjH21pW6s BmBvw4tVSULf4yPhciGUka1U/IBjxLmGO1dJa+eep9A9wVqXDG6aDqZVBMWFdCLbUKJX ZuQpzyQU0AfFh/hQAmmlsHQoc9FXdwOdFmmwBaf+OvP3RpGk/kUFLb38RMTfnagR1EBY UnwQkVNTXlsHbkOFvdOqZepHNcx06Oti30NRK5PpAHXkcmCWZv4oj8KQnkRoDY8COARV OERFZOdeYdbpj0Hbcs4eMt+Jgz8PHiFb6jVekFW4J28URXB7OriBIqZXD77qbdW2Tu2H LtPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=pW8DZPXL0yDnA9IKnS/BIrKEk5x3Vf6FLIpZJ0PvpHc=; b=M3hQK/+Owy+arzjXOgPAgY1zMk3DjcRtj6prI6KkV/hW0uk3vmjw1vuQ6xNRlU075T CMrQNMjCdQYCcTBqWO70sB9HFoqXPrcdI3Bt15iup7SYfDZy33mkVbnI8cT/DO9tcsKL zBMlZPzN4ShyAhJuV0WCF3UzIzO9FYPL/1soq9aoJYmbPlUbMrmYdNOLs+Tr+Hoo5ubJ w/o6UFcvvqjaNYHIGf//6ydlAnSwbQgWiqexNrrDhFeMrhqbIYe/+b3qaBZ9tVUq0Ll5 Yl5r3kmdpVKgJk+ZAQstvobcMjPZwe7heD5ZyNs/XELNGSZWhsVsQRahNtwKc/2pbQ6Y JC3A== Sender: isar-users@googlegroups.com X-Gm-Message-State: AJIora8GCAbz+aC+KoX1rMugqT2atBr9nInUZJqJvnQCq0LVbf19uz8R EoOVVP0/22D8JVoj+rpMKcY= X-Google-Smtp-Source: AGRyM1s8Q/Me0bpVNmz86u/uW+seMOQdR8/C98RgAg+4HkzMU5zLTcANoZCBmwn4GN3n7bJYJf+B3w== X-Received: by 2002:a17:906:7482:b0:722:edf9:e72f with SMTP id e2-20020a170906748200b00722edf9e72fmr30438008ejl.92.1658234129768; Tue, 19 Jul 2022 05:35:29 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a50:d0da:0:b0:43a:77a6:b0d with SMTP id g26-20020a50d0da000000b0043a77a60b0dls108158edf.3.-pod-prod-gmail; Tue, 19 Jul 2022 05:35:28 -0700 (PDT) X-Received: by 2002:adf:cf0a:0:b0:21e:2970:bade with SMTP id o10-20020adfcf0a000000b0021e2970bademr4668190wrj.455.1658234128739; Tue, 19 Jul 2022 05:35:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658234128; cv=pass; d=google.com; s=arc-20160816; b=gOXOBN1UveQX9p0Fsn+EX1WhYUljUPZ/xozQBVMmTp8UuSZgAMEghlvTBR4msxUUhV 6s+X0EcLXjffus5NE8SQD+MklCapxMwfvX4YXbVW38OQl0Zkv0Ukuoex2tKSjA48bhaQ TFvP5mdIYgEfPnCaahNWGUlcIGx9J1mWjFqrUwY0rNzdWtr022VLYAzixH2fzLPCdGXL CgS5I/RdeA1ihdoDQ0dHmLgl0RVFj0Hswf4yJGiHbu4nNZ+jcb/Cvw0vvTlAcc+M2p8N VZ7dOte2Jcg0b20sPAIaWzKFAllzE2vi8o/DsfH7Ovtfv/G/qtmkiOG0RIpBgmWUcGb3 rw0Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Bmt9vqRYp3GnI4pi3EwnVAfTftJGEZ/Y1cokhfqaJT8=; b=B0wAKNNSJ8pL2quExq9mfPst/vmfWK5ndZ+fEcQh6trPXKKs4n6xR+02lQQM8HXeWG 7wu4GFR7XDJ09xI776THHfgJyGGnTfy1x3xohKmL3FSK+QqIWWVb0SMOBEZkxLQ6zKkD VMWz+ELgZG3ThgR56InUXWAzX8Uzk7BuUb2YEvmF1gA7NLMwFszFOQI+ChQaWSxnwZ2/ fuuQLHe8JpbHl3k7nbNF89h59twUf8nMMm9IKh+LNekH1NP9anX4ZGsls3+YR7tx/SQV kYcZwwl+pTCWhieKMniTnT2REeV7GFA1y0/o8ceQB/KP6ulQTe/UgG1YwQZP28BvXXFz rVpg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=sNkf5at5; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of adriaan.schmidt@siemens.com designates 40.107.1.48 as permitted sender) smtp.mailfrom=adriaan.schmidt@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10048.outbound.protection.outlook.com. [40.107.1.48]) by gmr-mx.google.com with ESMTPS id u10-20020a7bcb0a000000b003a2ca59af2dsi365547wmj.1.2022.07.19.05.35.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jul 2022 05:35:28 -0700 (PDT) Received-SPF: pass (google.com: domain of adriaan.schmidt@siemens.com designates 40.107.1.48 as permitted sender) client-ip=40.107.1.48; ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nBsX1Ctw6z8LIkg65Q2MYxeBDH4uf7Iam/ZXx50W+fpE4g/k/ZCNxvfg0p8cy4i12kKCuNqIW2ZFHuW3gB0HsjT6mW0t5VEjmwGQ/W7vxKfdG6CDlOr89oUiM+4C9mOeosuzE10MSsmr7lQ04foDOIduaT2+sFaQrr4arzOCekYAT8jRpXwIVvXk1n4W2VxyudYHBzAYRxDjn1FpTvBeDOa8abw2XiTQ3X/atsG0kK5QVJ5DWU/cEvoTVsZlQxV01X88RcZqw2wBcNMJdmr/pleCqj1ydjNXq7uIt+SIUu9QItHQ8jFg1DVv9tvnwBivk3s7jd28Fw4yDpnE0bVhtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Bmt9vqRYp3GnI4pi3EwnVAfTftJGEZ/Y1cokhfqaJT8=; b=cpGA+dXhObdTDFN60V7RgafOjC37hICyo2ppY2yYTqGiKp6IQp0j5LF+qehZGizBascmRAuh82TCN9wc0SixcnYroNn1nn5bIDNUrb/jpvQcpbjg8j3+QFOt90IGz+kwH4cNAcDsmJkvTUR0Ol/6bzFbTpKQJvVGE6DD/cHrT6g+N1CSVhMMxbNolb1Uag9vSLBjGNP43FmE8/50baWMNsNRGUYSj/iAICy8ilWm1SZmonmmr5oLBaUcOSn8VMA05ZmtEbXvSHpGL+7INz91vrIDdv50gyKzWbDTcNi8sYiS5NYVCod/9jZ2RGJqfLwEtXA5D4HkII3BtVXoxlmlkQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 194.138.21.73) smtp.rcpttodomain=googlegroups.com smtp.mailfrom=siemens.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=siemens.com; dkim=none (message not signed); arc=none Received: from DB3PR08CA0022.eurprd08.prod.outlook.com (2603:10a6:8::35) by AS8PR10MB6032.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:53b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.23; Tue, 19 Jul 2022 12:35:27 +0000 Received: from DB5EUR01FT098.eop-EUR01.prod.protection.outlook.com (2603:10a6:8:0:cafe::5f) by DB3PR08CA0022.outlook.office365.com (2603:10a6:8::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.14 via Frontend Transport; Tue, 19 Jul 2022 12:35:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 194.138.21.73) smtp.mailfrom=siemens.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=siemens.com; Received-SPF: Pass (protection.outlook.com: domain of siemens.com designates 194.138.21.73 as permitted sender) receiver=protection.outlook.com; client-ip=194.138.21.73; helo=hybrid.siemens.com; pr=C Received: from hybrid.siemens.com (194.138.21.73) by DB5EUR01FT098.mail.protection.outlook.com (10.152.5.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.12 via Frontend Transport; Tue, 19 Jul 2022 12:35:27 +0000 Received: from DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) by DEMCHDC9SNA.ad011.siemens.net (194.138.21.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.9; Tue, 19 Jul 2022 14:35:26 +0200 Received: from random.ppmd.siemens.net (139.25.68.25) by DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.9; Tue, 19 Jul 2022 14:35:26 +0200 From: Adriaan Schmidt To: CC: Adriaan Schmidt Subject: [PATCH v2 1/3] fix(isar-sstate): catch errors during signature reading Date: Tue, 19 Jul 2022 14:35:07 +0200 Message-ID: <20220719123509.308439-2-adriaan.schmidt@siemens.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220719123509.308439-1-adriaan.schmidt@siemens.com> References: <20220719123509.308439-1-adriaan.schmidt@siemens.com> MIME-Version: 1.0 X-Originating-IP: [139.25.68.25] X-ClientProxiedBy: DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) To DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 51d9b3d2-150f-4068-6a27-08da698328e2 X-MS-TrafficTypeDiagnostic: AS8PR10MB6032:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uYExq/eB7BCXKFZvjOc9eadTB/I68e4UEYnw8gahEmuiX5vY6Gs+7T2Xpz2Er35ltJAnrIh9Pbg/bLM15XjHiZQ4EkYSDv/nlXRUodPWVKUfdOGQwegTZg1ZFO7B1E24Rtbo/rNaCIFoNuVaVLaB/7m27SuZVtAjud3cfwQGYaErA/t+D8roqHK/9j+ban9aaKRWTeG5lUS10aV1ChnZnsa/dUxqGY08RuO4Z75YnUsWLO8aANmZFGwhg6OMLVj7+kJ96nTVQP5c69l1wcmiEg2+p6CESXCFjxvbq71mIPlf0Xtvm4RmPSsk/0tbkHriXo6rXkB7Dh9xJDlW6YM1Rrv0Onkqf+tU56/CDaBYi7tb3tqd3HCy7fjtjIF2qOAGoffYr4r+hRv+wVcq5tIo88P5SOKHv/bS/vn8wQ0MUX5RqP5TW3epPao1Eei4URlQMWUnJNUNWNGqffs2qnPq+HmOxV7JYISkmAY1PB2mAU+8p0nfrDp5rJPoxBmCjRaboo/ci58QSc7JmifkOObMiuy/eOJIhI7OZK7ol0uIvivw6CNGqz2c3crYnKeDjnSdFcIlJr5kNFQXGrS1uf00qX7Q0OZ1alqhuWD+g/5pPwy/7OXzNTLlaxksL2R4jMaJxR3OI0zXa3FToYzI8SVCEmLGFX7btHICbybB5D2qc4umF8jdQUbjTetFJ0ZNAlicK6ErTEZEIYL1D1N4PVkTt4Yeoll4vAnf26RafjJ2gkhBDia33cbt86tBt36hNMJgWsWaUw9oxSoQ7n68MwVwg4Chknppwn/5nfdu/oRYzMaMgj96fN91aMHV+ls857Oc66NFwBVg3TODWLQoWLLMaw== X-Forefront-Antispam-Report: CIP:194.138.21.73; CTRY:DE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:hybrid.siemens.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230016)(4636009)(346002)(136003)(376002)(396003)(39860400002)(36840700001)(46966006)(40470700004)(41300700001)(6666004)(5660300002)(26005)(83380400001)(44832011)(47076005)(336012)(16526019)(40480700001)(186003)(107886003)(2616005)(1076003)(82310400005)(478600001)(40460700003)(956004)(316002)(6916009)(4326008)(70206006)(8676002)(81166007)(70586007)(8936002)(86362001)(82740400003)(82960400001)(2906002)(36756003)(356005)(36860700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2022 12:35:27.3280 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 51d9b3d2-150f-4068-6a27-08da698328e2 X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=38ae3bcd-9579-4fd4-adda-b42e1495d55a; Ip=[194.138.21.73]; Helo=[hybrid.siemens.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR01FT098.eop-EUR01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR10MB6032 X-Original-Sender: adriaan.schmidt@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=sNkf5at5; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of adriaan.schmidt@siemens.com designates 40.107.1.48 as permitted sender) smtp.mailfrom=adriaan.schmidt@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com 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-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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-getmail-retrieved-from-mailbox: INBOX Those errors happen when the sstate cache contains both pre and post bitbake-2.0 signatures, which have a different format (pickle vs. compressed json). Signed-off-by: Adriaan Schmidt --- scripts/isar-sstate | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/isar-sstate b/scripts/isar-sstate index 8ea85edc..5c47b479 100755 --- a/scripts/isar-sstate +++ b/scripts/isar-sstate @@ -781,7 +781,10 @@ def sstate_analyze(source, target, **kwargs): local_file = source.download(s.path) remote_file = target.download(t.path) - out = compare_sigfiles(remote_file, local_file, recursecb, color=True) + try: + out = compare_sigfiles(remote_file, local_file, recursecb, color=True) + except: + out = ["Failed to compare signatures."] source.release(local_file) target.release(remote_file) # shorten hashes from 64 to 8 characters for better readability @@ -803,8 +806,12 @@ def sstate_lint(target, verbose, sources_dir, build_dir, exit_code, **kwargs): for sig in cache_sigs.values(): sig_file = target.download(sig.path) with open(sig_file, 'rb') as f: - sigdata_raw = pickle.Unpickler(f) - sigdata = sigdata_raw.load() + try: + sigdata_raw = pickle.Unpickler(f) + sigdata = sigdata_raw.load() + except: + # invalid file or format... never mind + continue pn_issues = [] for name, val in sigdata['varvals'].items():