From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7057835350645800960 X-Received: by 2002:adf:eccc:: with SMTP id s12mr1344434wro.139.1644585036778; Fri, 11 Feb 2022 05:10:36 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:600c:3596:: with SMTP id p22ls2431116wmq.3.gmail; Fri, 11 Feb 2022 05:10:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwp2NMzMUMEHo47TawK4lsArQQDQFoMBP1GMUlbiXS844gSUzN4c8b8xA+aBvm/NBbtA5tB X-Received: by 2002:a7b:cd10:: with SMTP id f16mr254917wmj.180.1644585035977; Fri, 11 Feb 2022 05:10:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1644585035; cv=pass; d=google.com; s=arc-20160816; b=C6sKVjQCf0BDSr6czVLVPCl5LwyM6kL0ArKsNgmi3K2IulHst6m67AQdgQkUpXXVpJ wFaqipzKu9I93nO0OOIWmgoQ6dztWuuvRXNocAVDcZXmc916uORqhN4ifKoQGfG0sH2w fZP8n+WjY2PbOEtiZhnukRvjzi8iMIGvqlzSEPtnZltrFkvv+o49nbnz2kcU+qa64ckS OagopprwruSU35vNxg/k+hFfbSjg2/yH98LjHeP32/wE8Iy3BpBO/FEyuNrbRfiyH1tZ INZr1kov24xaBEkDRM6WYnbKuxOp2Gpl48VmJs9UqJyQK/RIo3ARnUTrozskOL3Yxpfi 5p1A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-transfer-encoding:references:in-reply-to :message-id:subject:cc:to:from:date:dkim-signature; bh=ZUa+1TB8erQuADaA74gq4ldac4lQ6FFKPhA//VbE1HU=; b=KG0NNcjxRBvsZ97xQeK20/iF6zilp/ievrVCfJqj6DBVpVEkC+rzvDK2RJcYLcjXmC ZodaLIbkYOKDOE0TfQs4Tnu98BPhqGisQsEy38f2gAlgCCKJG+qc3yC4a/ygDzeGXims LKXwyQHcNV17R9x0cTA0sLBlmnM7prVeI9t/MsfqLHOfUkQmVT1kLV8oAup85TVB6+4O m6DKqBznXiC9/XJnYL68ynTzwC93g+GGNvNdDeZZ+4ZTGG1jOe4sQ83hOMGAkTJi+TBk plyXETicUtBgk8vItEnMnHMeUlS5oxFFOiknL8xZ10SebvOVbyAHn0sPl6Qi8aeSfcab eOgw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b="c/eKqNot"; arc=pass (i=1); spf=pass (google.com: domain of henning.schild@siemens.com designates 2a01:111:f400:7e1b::620 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on20620.outbound.protection.outlook.com. [2a01:111:f400:7e1b::620]) by gmr-mx.google.com with ESMTPS id x19si332271wmh.0.2022.02.11.05.10.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Feb 2022 05:10:35 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 2a01:111:f400:7e1b::620 as permitted sender) client-ip=2a01:111:f400:7e1b::620; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b="c/eKqNot"; arc=pass (i=1); spf=pass (google.com: domain of henning.schild@siemens.com designates 2a01:111:f400:7e1b::620 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CL5fwsOYKlE26hguSUvPNr94/iZKLbeJUz+4Xg+Ht4J9ZY0QDCbVSlUsK/Q946zyoiZTbssOcZf9fbCpDdTve95SPBJwj/6gb4JFDC4Luu3tUBsHy9++200SFdOHbiN+2S1ZHriyvzI8wazI5FVyY5KdyWdzOU0OKcLcLc6FVSr9qaaNMHDPVfJXawjtIi3xVAREIzvKxnPjvO0pjhsCGrdhFMIqNG4C+qMR9WipH8+EgI5/rGFcbfHCNNr3g/oIlI6zD1AL/F9xceBrTjilek4X4ilQz65XcEHz0VQhmuBkbpJ29Iufkb+RC83HD8WiRYbXaQzzuSO4VV+6p2Jaww== 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=ZUa+1TB8erQuADaA74gq4ldac4lQ6FFKPhA//VbE1HU=; b=PO8fVNkiAFAnQ+eV6TEEgWYMmTjkt2knb5MtgFmfl85iMaiJVYvD6sZXbKtMFH8oocbtnHVbvyqR/p43eA4gNP7bG1d24y004WMxQGyLGCvLEsDpRRqpzZy6tWJ7LftGisZq2YjTN0WbqVHah22tKwMxuIYQc4DgmxQ4muuMwalyflow2iDNDO3fB7qStoxzCNvsoAv2JIvqXp7s9d2jWGzRAvYZ0sNxTg6w14gjTkE1F+1yetTta+Ss2OfUjq+pkGhxF59/x6JbFDSbL1SGLZFZgeTQSyrxGithL+x8XNOWnu3BRnU+NEkv4zzfLnHAM5qCV1Lh2KIqrNz+g1tW/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZUa+1TB8erQuADaA74gq4ldac4lQ6FFKPhA//VbE1HU=; b=c/eKqNotrG2DoTr0PIyrIRQCMlwjruNFtCXzr/OT0yroE3sql6ccsDuKrhZqMeQMXA5phBsOZ8qjf0XtxpiVkOIVpuEcGBgEa8+3PZ0l004O3WBJ86tJRmZpLxxq0xeElI8+yrw15cWB7XyghHwYhE7Xy/txi+GalsfqCpa0iuJloBuYqrEAbqBUd62THrrKDHOF+5AVkDP1aY6QJXaGVCDOGMq9L2Yvb1wWoMVaagiOO/s4sxNKw1rLG19v2TFEZa3U7AN9ZMbF1Fc0Hol7m49KwCEsCH8MDZR7+bhP3x0sN4LBCICR2X3b3j5dSYXogJbSct0AOEvQ86bKd49pGA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siemens.com; Received: from AM0PR10MB3459.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:155::20) by AM0PR10MB2113.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:4b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Fri, 11 Feb 2022 13:10:35 +0000 Received: from AM0PR10MB3459.EURPRD10.PROD.OUTLOOK.COM ([fe80::d433:79c4:958b:1551]) by AM0PR10MB3459.EURPRD10.PROD.OUTLOOK.COM ([fe80::d433:79c4:958b:1551%5]) with mapi id 15.20.4975.011; Fri, 11 Feb 2022 13:10:35 +0000 Date: Fri, 11 Feb 2022 14:10:26 +0100 From: Henning Schild To: Uladzimir Bely Cc: "Kiszka, Jan (T CED)" , isar-users@googlegroups.com Subject: Re: [PATCH] deb-dl-dir: Use dpkg-deb --field in debsrc_download Message-ID: <20220211141026.5a89853f@md1za8fc.ad001.siemens.net> In-Reply-To: <1861231.7Z3S40VBb9@home> References: <20220127104544.13077-1-ubely@ilbers.de> <20220210132515.52db2852@md1za8fc.ad001.siemens.net> <1861231.7Z3S40VBb9@home> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BL0PR1501CA0026.namprd15.prod.outlook.com (2603:10b6:207:17::39) To AM0PR10MB3459.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:155::20) Return-Path: henning.schild@siemens.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6947a9e7-bcc7-4940-80a8-08d9ed5fe3a7 X-MS-TrafficTypeDiagnostic: AM0PR10MB2113:EE_ X-LD-Processed: 38ae3bcd-9579-4fd4-adda-b42e1495d55a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: t5ZRBndXd9wSJPcrAPNIgv3kuUZDvTSWcu6Iiq+JpRaNdEdA+G038kK4Y02XZCs3gv47xUAuw/C48MPewbIBIWkdowqWs6V4Kahn4Jf93emPi3FOCT70J53OA7XCz5lX6d8qeMYLSfqKhEnd8xU+t8zY36TVZEvmcj/dCebQuAn+IPQc7x/RPKgGmmB6e0kxY+erUHbcp6aTJ93MU9vsBfojB22utfIXGI9zXq8yZHnslW3EnLHFJbpNpPp/NuK/C5J1HPS3aAUEmNngmHvnc06DJY+HHn5Un6bo2WtW+vEGNRjQbp3R01F6XLVIi2/52w6O1pa6+Yjzoka5BlIDPXaBNNBHUpuvrOb0fcQt4EwSBLmvR5gAs9Ugb/y1c7eSOBKTbb+NRLlvcYUbEpEXebugX8fdYLEQjrI6J9WdnESs6OwVQATGpz2A/JTDPBH5hWJhkh5oYWM7B/2B1lO59TlKZCKtyGD1o2PxU+raj06kcr2mcsHL+cXycONRTDOx0wkA+bOJ5adS4xb0g8EQ3GlAYTecOv3CFhaeCLCOt6U3Hq3RfvLQLPg8F3fqRUquL6/CIMFl0a5zRT1YiezjrFPhf1sEB0YvJ/5MMJaGA2DVw5Oz21YPTTBvxn7mm1CmHZYvpM8s/T8WpXxTti/7qr5SaRv77MiafRyM5fiqAB5MVwDOh7Se+C53QMXfIUgoeIzWTMbWFRoK9UU+FWf8yPqUCZHAvtZDs0Q/y0C1OIw= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR10MB3459.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(8936002)(5660300002)(6506007)(6916009)(6666004)(86362001)(9686003)(6512007)(66556008)(66476007)(4326008)(8676002)(66946007)(83380400001)(316002)(508600001)(6486002)(2906002)(966005)(186003)(1076003)(44832011)(82960400001)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?CwTw6KU04W/TM1dOaVDtGogBYpAARFK+OxxJ7B7sxu+Jn4Ujb26+uoxp5gR4?= =?us-ascii?Q?IQgQ45l16ubvtcG4aWDF/6QR1Uzb0UT3WPuEPLzUt9UC45FwHJjePG2+EncX?= =?us-ascii?Q?+PQESk6y4ASigNDFUUJde6PBwmsQpD1vsnT+QhnOJv+UPp7sGIuYw8DLg3mM?= =?us-ascii?Q?tYtapR5bZLiQtAFYMiHVrTlKp1j97s9sHyKQNlvMKY7TZOe00TshSWLC7CK/?= =?us-ascii?Q?E2PSo2gu5REvXbqBi5upx0ysiR2+W7XEjzdxvymm4c6viFInzBZ1PA4p0+4H?= =?us-ascii?Q?+Yr/VjAHXolXJb9YF8oPjUeMrWYXwfTqTcsYOKehutQnUVYdU6XUqGp0mio5?= =?us-ascii?Q?ZsuklzyVX/2OZ2v68JgcxzoN4pTCIoY8addZ07QVpr3sRTcAFLQrp8FU4OLs?= =?us-ascii?Q?ZaH27RCPbXJwoMgnggZbLhmdndswRjNSWQROiSlNMNt33zX5RBAg3dC3ALjL?= =?us-ascii?Q?Hu9Da4dF+7gtStkq7BwPJKy3DNgLpQEK/pfiQv39yIiQC+vk0ySU/t5kIWOp?= =?us-ascii?Q?1z2751Khdly6R1PI2SN61vk7Ly8v40Z9zD06ko3GpFWUdS4oto45YFBA3F6D?= =?us-ascii?Q?I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ltczl8xwm2CphGws?= =?us-ascii?Q?TVxI3vJzspi1eFjHcx117uWlPLjRQyG6q9Ry9QNHZwMQ+LNSiDB2LC/Xyiv8?= =?us-ascii?Q?ilmDZEr6NLu5yRdiVEbFTqf/CdPnAqhYlELX0YPUtoiLknQPE5kC+K7j0Feh?= =?us-ascii?Q?16r4a26tA9aeENGHfcerxIRe42ceyp+lYKTBqT4pxKEqNPesVFqYaPLcWul4?= =?us-ascii?Q?tdDRfE+4aNywPIJ2H3shilvRDzer52qKryTDHV2n/m6lvHK14kY1RsOEONUa?= =?us-ascii?Q?TZIvM8n9Pw=3D=3D?= X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6947a9e7-bcc7-4940-80a8-08d9ed5fe3a7 X-MS-Exchange-CrossTenant-AuthSource: AM0PR10MB3459.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2022 13:10:34.9691 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: RD8YC9m0rhYO4ChihKxKnRUEoRA6KX+TmC5Ymo3201TWRRtVaX2yKW5wkM3DJk4oaBYoY+bQSrN9NfVqrSWSo1b3PPNnTpGJ7nHRY5lAZDc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR10MB2113 X-TUID: 36qWBwwfS+RO Am Thu, 10 Feb 2022 19:55:04 +0300 schrieb Uladzimir Bely : > In the email from Thursday, 10 February 2022 15:25:15 +03 user > Henning Schild wrote: > > Am Thu, 27 Jan 2022 11:45:44 +0100 > > > > schrieb Uladzimir Bely : > > > In Debian >= bullseye 'dpkg-deb --show --showformat' is currently > > > broken in case of requesting virtual fields like > > > 'source:'. This makes function 'debsrc_download' > > > broken, so build fails when ISAR_USE_CACHED_BASE_REPO is enabled > > > in local.conf > > > > > > The regression came with the fix for bug #972580 in Debian. > > > The issue is reported to Debian bugtracker as bug #1004372. > > > > > > Signed-off-by: Uladzimir Bely > > > --- > > > > > > meta/classes/deb-dl-dir.bbclass | 10 ++++++++-- > > > 1 file changed, 8 insertions(+), 2 deletions(-) > > > > > > diff --git a/meta/classes/deb-dl-dir.bbclass > > > b/meta/classes/deb-dl-dir.bbclass index ffbff077..ded9b3be 100644 > > > --- a/meta/classes/deb-dl-dir.bbclass > > > +++ b/meta/classes/deb-dl-dir.bbclass > > > @@ -51,8 +51,14 @@ debsrc_download() { > > > > > > printenv | grep -q BB_VERBOSE_LOGS && set -x > > > find "${rootfs}/var/cache/apt/archives/" -maxdepth 1 -type f > > > > > > -iname '*\.deb' | while read package; do > > > is_not_part_of_current_build "${package}" && continue > > > - local src="$( dpkg-deb --show --showformat > > > '${source:Package}' "${package}" )" > > > - local version="$( dpkg-deb --show --showformat > > > '${source:Version}' "${package}" )" > > > + local src="$( dpkg-deb --field "${package}" Source | awk > > > '{printf $1}' )" > > > + if [ -z "$src" ]; then > > > + src="$( dpkg-deb --field "${package}" Package )" > > > + fi > > > + local version="$( dpkg-deb --field "${package}" Source | > > > awk '{gsub(/[()]/,""); printf $2}')" > > > + if [ -z "$version" ]; then > > > + version="$( dpkg-deb --field "${package}" Version )" > > > + fi > > > > I personally find that hard to read and would appreciate some > > comments on it. > > > Initially, we assume that the "source package" name and version are > the same as "package". It's usually true. > > But sometimes "source package" name may differ. In this case, > "Source" field should be specified and we use the value from it. > Also, "source package" version may be also specified using > parentheses (if it differ from "package" version), in this case we > also take it. > > Some example, when names and version of source package are different: > > | dpkg-deb --field librtmp1_2.4+20151223.gitfa8646d.1-2+b2_amd64.deb > | grep "Source:\|Version\|Package" > | Package: librtmp1 > | Source: rtmpdump (2.4+20151223.gitfa8646d.1-2) > | Version: 2.4+20151223.gitfa8646d.1-2+b2 I read and understood that code yesterday. So i know. I was talking about comments in the code, making it readable and saying these things. Maybe parts in the commit message in case you want to go really deep. But not here. > > In addition i would keep the original code and only take the > > alternative approach when src == "". Adding a comment and a TODO > > revert pointing to the bug. > > > I agree that this should be a temorary workaround. Unfortunately, > there is no activity at > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1004372 for two > weeks... Maybe we take it, but keeping the old code and marking the new with "TODO revert". In that case we maybe ... hopefully do not need good comments for the future ... because the code will for sure not be there for long. Or anyone reading it in 4 months will see the TODO and propose the revert. Thanks for taking care of that upstream! Henning > > Looking at that bug it seems to be a matter of not much time, so the > > workaround in isar might not be needed if one had some patience or > > used kas-docker 2.6. > > > > In fact i would prefer to keep that patch out alltogether and wait > > for upstream fixes. > > Maybe skip the tests doing ISAR_USE_CACHED_BASE_REPO when on > > bullseye, or use kas. > > Oh, I seem to copypasted wrong variable to the commit message. > > Actually, it is not ISAR_USE_CACHED_BASE_REPO, but BASE_REPO_FEATURES > ?= "cache-deb-src". I will fix commit message in the v2 patchset. > > > > > I will send a patch to pin down kas in isar CI. > > Jan please note that kas 3.0 will have to wait for #1004372 > > > > regards, > > Henning > > > > > local dscfile=$(find "${DEBSRCDIR}"/"${rootfs_distro}" > > > -name > > > > > > "${src}_${version}.dsc") [ -n "$dscfile" ] && continue > >