From patchwork Tue Sep 29 22:06:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijai Kumar K X-Patchwork-Id: 96 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:eb04:0:0:0:0:0 with SMTP id f4csp4809239ooj; Tue, 29 Sep 2020 23:07:28 -0700 (PDT) X-Received: by 2002:a17:90a:8b8c:: with SMTP id z12mr1048245pjn.185.1601446048123; Tue, 29 Sep 2020 23:07:28 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1601446048; cv=pass; d=google.com; s=arc-20160816; b=XxRnepgCK81vlCBXYKn9Dl4e8UPFqaAAHtwIKTbsCE3mo+PAJZRv663sNLn3kOqJyA O7oCMdPaIcBBi3m+rf9YN+ieb3kmOwKQvcAD1uw/WnK2st/ECg7nxTKqqJ0v2br45Deh z1Ke5fCiQUBhjlc289IbfAXH/bPwVB52RIlHejXA0rNcVqcnlZNSqJ++FkBOIL+vwERW K948D+5hyS7dkNbboVwt9sPyvD5Q4wu/3scyaL98wNsgOQ52c2eiISUWTa/fox0wf8/q R5yAbCbQJ/vjdntPX6PyiRN3XWnv+qw8hElAfLp2IUlpgoar+VTMZ1yLYBzuHchmXL0Z 7tGw== 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:ironport-sdr:ironport-sdr:sender :dkim-signature; bh=8j/GySIbOnG/+/ZJuS0/IND72BFZMQisHI/HKMv+dsQ=; b=rwA4BX5aapaoUe81AknDU9sy4UF/yymWS6jpZdijpaYlWOB9pJyAkq6EjRC8TGvMZv BJegzWJEfLVH8fJYeTnJqdgUVXc4KlzeLfvIMorUAl9fT62BWRWDl5iUOdMXFtlvlABJ pjfYYvzJEpXuFaHP3T9BGh5MAtQuGpbGNuW3rkC3GBm9A6ZnXw9BN0En5pdWvVgMSudh xE31QZOthjjlXhG/m8q58U1ZDCeYwxgZfrpbxd+8SWMx4WHkiKFriujdYURoUZ7LUDzX 1zP8tCAwCCUj6ELauIkZE74NXkYO9zP2pYg1YuevnijNzKtO4r51chejH1EdmJwwZaca 6whw== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=aGWNoP5T; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbh6b2d5qkgqekil4eoa@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBH6B2D5QKGQEKIL4EOA@googlegroups.com Received: from mail-sor-f55.google.com (mail-sor-f55.google.com. [209.85.220.55]) by mx.google.com with SMTPS id l2sor412852pld.43.2020.09.29.23.07.27 (Google Transport Security); Tue, 29 Sep 2020 23:07:28 -0700 (PDT) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbh6b2d5qkgqekil4eoa@googlegroups.com designates 209.85.220.55 as permitted sender) client-ip=209.85.220.55; Authentication-Results: mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=aGWNoP5T; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbh6b2d5qkgqekil4eoa@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBH6B2D5QKGQEKIL4EOA@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1601446047; cv=pass; d=google.com; s=arc-20160816; b=TIIXhBIyb3bUL4l8Fp4/AimccPt/dh6Q7QRcWhXTdw2J2zT0l1caMSDMtRPhI4jHl1 2Su1FMOzmCc6tWRHMkTzslrJdWuT3WgXRxrBPwYdiVyEBARdB8T1h6WIu038QbGzmDbr GquiQQ3SPz5xVQuGROFy6TEbKqNTycfqui37yqTYT/xJ0C7sEBrDrZhsyoJ4EQs1VsYy QLVWxjUshxzqZym7CcqSHeDiEUey1kEDkcQwy1jEmXDxFTPR3+82qZvwCXXD9K9xoXD2 4MQFcriiba40rF36To4lvbW32JWFk3Q0QPcnen7WwEtmC7fZ6pIAQHskRV0R4GSbW54r iI+w== ARC-Message-Signature: i=2; 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:ironport-sdr:ironport-sdr:sender :dkim-signature; bh=8j/GySIbOnG/+/ZJuS0/IND72BFZMQisHI/HKMv+dsQ=; b=GkkpNLO+Fsh+iNwp08HB8D71KQW6Yhat/My9uOC5SxRfhw5hepQryxnbSVYVkCm+Pz MjA4n9DJ+itYjCRauvL5zWthJe2lOeYlK0k4kxDoRj/Y372oAnecrHTrW0gm0FLDTSit MnAKp+iJ7/unHdjA59FiiFx8aXYQlD/6IA5SdDS/NUDQULRKp09SleC1S+bGyttLRkzI EKmapKlul0yrOsG7yyDl+CosouyGh5rAzvnlMFS5SICD/pFLObBvRzozZaHIgbP2U2/V LVyO4M5nM4l0X3I6oShJ1IXRJnUTfpKgzNJEH0MQkmYZrDVXf8+lnMpGlMhzrSh7ipcB 8qkg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:ironport-sdr:ironport-sdr: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=8j/GySIbOnG/+/ZJuS0/IND72BFZMQisHI/HKMv+dsQ=; b=aGWNoP5TJnVKgoggEOXmU+Tzzp7g0VJ2b0GqwG/pUqLJz7izsVJ5iHzuY4z9ZA0zQ2 2Xbsi9ak9jlXwZII5KCEhr5d9X9itaLHu6TJ6WY+93UhIlSNnTQREdoF0ucnbwwgXruv tXmHamvatufoIFbZxxtMR+h71YEzaQ486riA7Sg+WedG+lhi5A2i68c9pCuZFeXNJ4Ru iJpiUY0SKN/q2R+WU8wiQv3DOIGqCGRkZDSoLuKM5LE41azlrMAwU4Tl/nN0hd4B9S+D IxBou5KsMOt10H7XeiOQYtxam8JkraI61+ajRO10mBx15rusjL576MmKoNhGckd0xkkG S3dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:ironport-sdr:ironport-sdr: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=8j/GySIbOnG/+/ZJuS0/IND72BFZMQisHI/HKMv+dsQ=; b=YLuFPeSJnuGNCL0uM/dCQVII2zw6WGhj9r1zDpA5ifLP4Zy49F+ubKqGe247LrPsLp xE3X2EYFck1KSfs2Ors6DazMOPpKyrwqfrwAU25UTJ4278e8IhHNEMniAmw65TzmKKhK sz1IprT3du/Fsu6c+1XwxfpDwIujxcEkiUCxh5iDDR4pQR9j5O1lDx0UgRSWMR+UMpKy FncAsJBAe2NfHwdRDZOyuWvhtjWFWfF9Z54m27twDHUPORFLaAYRATGmCdeF+XM70Hzm ikPgkOPxLZdJHq7sLqxL1MHBV0spzHFEl4VwPpOX6lFIRbba2ZY1tUQqlUEONURgtlqC k1Kw== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM5303IQcDks1B7xdvfAP1MezLkgJjfJ5z2ZuTjboHOQS+NUguYAuX Hth1OMOl4euUuPgIrUqh34w= X-Google-Smtp-Source: ABdhPJwAQGchibXssvYuc8OWVJ1kt0X1MEzHj02Aa1ewohVtNX15OEUWKBdTQYwuouPL/uW6I/nlmA== X-Received: by 2002:a17:902:b702:b029:d1:e598:4014 with SMTP id d2-20020a170902b702b02900d1e5984014mr1300415pls.78.1601446047702; Tue, 29 Sep 2020 23:07:27 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a62:45:: with SMTP id 66ls418102pfa.1.gmail; Tue, 29 Sep 2020 23:07:27 -0700 (PDT) X-Received: by 2002:aa7:948d:0:b029:13e:cb8d:60e0 with SMTP id z13-20020aa7948d0000b029013ecb8d60e0mr1262831pfk.9.1601446047127; Tue, 29 Sep 2020 23:07:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601446047; cv=none; d=google.com; s=arc-20160816; b=gECqfz3FwlqSPfiuVkLANksg/SWg5dg+MTfFVyNlsQM3tp5KChovygFCnLRWcIysSP PMcdPOjo69Haso+GmXNw99dTU8szQKFmRmfL6t6lhLFhAHEaw9eh1KbhfwH6p0JwGXKf MlD1RyzKKCaqyO6ajpx+lFheECR4wg5ImMDCcfRsHt0IFAx2yCsbMc81fi2T8HRbP+77 6jVyJjB4FDX44SYr3p7nkyJj/EtGWnpRcb8XUqj5sLhYfJ2iE6XwNnx87ujUuKYnfBDb nDlx9Fl4tM6lv/r+3T57Xwc+wYhWhDYVbVtHJQagPoI3eJ37JpGPtA+eHoDJKcEYGwQA K7bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:ironport-sdr:ironport-sdr; bh=eNGr2sY82htXXv/f2Ypru+JC6ylWvonjFgG9JC2l700=; b=epvZ9bPbo3BPB2i+FXKawMS7ryAvWCneJkvdS/DluUNyQ3LDnU02QXuP5P4AGiCurk +82jPlqh8Kh7lCKSU21saS9FedFLtSgY4DvZfDq+vluXyFpHN7Y7wv8bED3xS9OPKDdt lvFXdALDyg7nzPWdIjuW30QvA4oGf4HyeguP6t/1Ug6onOulmpQFOMZuCY3XtrZ8dd3+ AKOtnF2tUif2++3uz6b4SFvcvybGTTJ5cAOoFAdIF7Q5Vmk05r2zkvQIa9OKEaBtaPA+ 6OL6Lzz41tDJXnEwiMwcn7pTFcGeo76m+0ECflR0riXN2a+BFl4MvFSHYxw0Twv3NMah 1PNg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com. [68.232.141.98]) by gmr-mx.google.com with ESMTPS id o13si43847pll.3.2020.09.29.23.07.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Sep 2020 23:07:27 -0700 (PDT) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) client-ip=68.232.141.98; IronPort-SDR: naMg+tU+PZOu7GoVFW/URMBJg3WOje2t2vRK1ZX+KhfzyEQJtyAlmXcLgym1whiAU/tnck+Yc1 rmxMYb4iGQAew4szHgwb7wa/47sRl/aQ7/0PbF8XjKGCtrHbUsjHJOip2vDqXsnwI4s9MgNKtC jE9CnSMBgbdXHvLZF5zN+JtOfrnD/EWhjSmJwC0L9SSZhR+jeefm6Wn9u8pvtMFDqdMzAsSEEB qQgJ8zXeGt3L3OuIXbTeIci1vRgNtGXZtAdQr0iQ9khB7ghXg5X24QlfEElz9UN1V+dX0R+NUH 7AY= X-IronPort-AV: E=Sophos;i="5.77,321,1596528000"; d="scan'208";a="53462088" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 29 Sep 2020 22:07:26 -0800 IronPort-SDR: zcqqlSu/Vv6iBN6oq5scNrvdrVN4ztLqG96y1kCA/SfijnvYbPTx9N66z+/DyR0NlTzCooCiZ1 fmasyiOWdCXIkFAKjqf7s3Mq0D8XCt8m5hHIzVFsGI+rDO0uEgOyfuAGcaHmGbX/tG2xSbZWSE Gv5mdFtX3l3wE/euaVwBcfZYeaouTIzvAECirGuJPmDoxi/HvWAZgtuYwag837Pn0zo82OXnbe 9MlFZdfBxM73vZHDstqJvcdlHQv/9vD6XjSQtkky23P9QmxyKIkKjXsyczyzciMyq4eH+SBcfJ c/k= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v6 04/13] deb-dl-dir: Make debsrc_download faster Date: Wed, 30 Sep 2020 11:36:58 +0530 Message-ID: <20200930060707.12785-1-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200930060259.12422-4-Vijaikumar_Kanagarajan@mentor.com> References: <20200930060259.12422-4-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-06.mgc.mentorg.com (147.34.90.206) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-Original-Sender: vijaikumar_kanagarajan@mentor.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1679237891227378396?= X-GMAIL-MSGID: =?utf-8?q?1679237891227378396?= Eventhough apt-get source skips redownloading of files, it is still slow and takes a lot of time. Instead, lookup if the dsc file is already present in the cache and skip based on it. Signed-off-by: Vijai Kumar K --- meta/classes/deb-dl-dir.bbclass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass index 659fe4b..79a9a88 100644 --- a/meta/classes/deb-dl-dir.bbclass +++ b/meta/classes/deb-dl-dir.bbclass @@ -20,6 +20,8 @@ EOSUDO find "${rootfs}/var/cache/apt/archives/" -maxdepth 1 -type f -iname '*\.deb' | while read package; do local src="$( dpkg-deb --show --showformat '${source:Package}' "${package}" )" local version="$( dpkg-deb --show --showformat '${source:Version}' "${package}" )" + local dscfile=$(find "${DEBSRCDIR}"/"${rootfs_distro}" -name "${src}_${version}.dsc") + [ -n "$dscfile" ] && continue sudo -E chroot --userspec=$( id -u ):$( id -g ) ${rootfs} \ sh -c ' mkdir -p "/deb-src/${1}/${2}" && cd "/deb-src/${1}/${2}" && apt-get -y --download-only --only-source source "$2"="$3" ' download-src "${rootfs_distro}" "${src}" "${version}"